johndwells / Minimee

Minimize & combine your CSS and JS files. Minify your HTML. Because size (still) DOES matter.
http://johndwells.github.com/Minimee
56 stars 16 forks source link

Should minified HTML be cached? #8

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hi John,

In Minimee 2.0.1, I've noticed that when using a single {exp:minimee:html} tag at the top of my template, the HTML minifies, but no cache folder is created.

Is this expected behaviour, or should a cache file be created?

My paths are setup correctly as if I surround a CSS file with the {exp:minimee:css} tag pair, a cache file is created for this.

For info, here's my config overrides:

$config['minimee'] = array(
    'cache_path'        => "${_SERVER['DOCUMENT_ROOT']}/min/",
    'cache_url'         => "http://${_SERVER['HTTP_HOST']}/min/",
    'combine'           => 'no',
    'combine_css'       => 'no',
    'combine_js'        => 'no',
    'minify'            => 'yes',
    'minify_css'        => 'no',
    'minify_html'       => 'yes',
    'minify_js'         => 'no'
);

So I just wanted to double-check with you so I know what to expect.

Thanks,

Stephen

johndwells commented 12 years ago

Hi Stephen,

As you're finding out, HTML minification is not actually cached. If it were, then we'd be in a whole new arena - namely, page/route caching, and there are already fantastic add-ons out there for that.

Minimee can be used in conjunction with these - so for example if you have Minimee set to minify your HTML, and then have CE Cache installed to cache your page contents, you'll have the best of both worlds.

Cheers, John

ghost commented 12 years ago

Hi John,

That makes perfect sense actually, so thanks for explaining. :-)

Yes, using Minimee in combination with CE Cache sounds like a great combination for EE.

Thanks,

Stephen