Minimee
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From John D. Wells
Don’t strip server-side includes when minifying HTML
Feature Request
JUK
|
Posted: 04 February 2015 02:47 AM |
|
|
|
I have HTML minification enabled and it works quite well (Minimee v.2.1.13).
But when I tried to use an SSI (server side include) it was stripped as well because its syntax is
<!--#include virtual="/another-file.shtml" -->
and I assume Minimee interprets that as a comment.
Are you able to not strip out SSIs?
Thank you!
|
|
|
John D Wells
|
Posted: 05 February 2015 07:29 AM |
# 1
|
|
Developer
|
Hi,
The SSI is in fact an HTML comment, so the HTML minification library is going to strip them and there’s no option I have available to exclude it. Minimee uses this library for all minification: https://github.com/mrclay/minify
I am curious to know how SSIs actually work in the context of an EE template. I would assume that SSIs don’t work since it’s the EE template parser which renders the page, and not your server?
Cheers,
John
|
|
|
JUK
|
Posted: 05 February 2015 03:53 PM |
# 2
|
|
|
Hi John,
you are correct. I shot too fast. My apologies. Even if I turn all minification off and I can see the SSI include code, nothing is included.
I ended up using PHP’s file_get_contents function.
|
|
|
John D Wells
|
Posted: 13 February 2015 04:03 AM |
# 3
|
|
Developer
|
FYi You don’t need to use php just to include another template, ExpressionEngine has tags that can do that for you.
Cheers
John
|
|
|