Extension, Plugin

Archived
Forum
(read-only)

Minimee

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From John D. Wells

     

How to minify HTML?

Bug Report

noop46
noop46

I can’t figure out how to minify HTML, there’s doesn’t seem to be any config options and it’s not minifying by itself when I view source code.

Thoughts?

John D Wells
# 1
Developer
John D Wells

Hi Anthony,

Are you running EE2.4+?  That’s required for html minification.  If you are running 2.4+, which version of Minimee are you on?

Cheers,
John

noop46
# 2
noop46

Yes, Minimee 1.1.6 and EE 2.5.2. I don’t see any html minification in my local or dev server. Am I supposed to set a config setting? Here’s the minimee config I have in my bootstrap file.

  $config[‘minimee_cache_path’] = EVOLVE_BASEPATH . ‘/cache’;
  $config[‘minimee_cache_url’] = EVOLVE_SITE_URL . ‘/cache’;

I don’t have the extension installed because I am setting config variables. JS and CSS minification works great, just can’t seem to figure out HTML.

John D Wells
# 3
Developer
John D Wells

Hi Anthony,

OK got it.  I’m sorry that the docs on this are thin - I’ve been very busy and at the same time trying to work in Minimee v2.

Try adding this to your config array:

$config['minimee_minify_html''y'

Let me know if that works.

Cheers,
John

noop46
# 4
noop46

Yup, that seemed to work locally. However, it doesn’t seem to work on my read only server. Are there any special additional php extensions needed, or folders that need to be writable?

John D Wells
# 5
Developer
John D Wells

Hi Anthony,

Apologies for the slow reply, I missed this in the mountain of emails from the weekend.

It’s odd that it will work locally but no on your other server - there are no special extensions necessary (that I’m aware of), and it doesn’t write anything to the server.

Beyond verifying that the config settings are correct on the other server, I’m not sure what to suggest.  If you’re willing to try, the Minimee v2 is a bit better at debugging messages, it might help track down exactly what’s happening.  V2 is in beta but quite stable.  You can find it here:

github.com/johndwells/Minimee/tree/version2

Cheers,
John