Minifier [Deleted]

Okay I see it in the page source. Cool!

Does this affect the templates in AdminCP whenever we edit our Templates?

Does this speed the site up any?

The minification is done before outputting the page, so templates are stored entirely as is. It might speed the site up by a small degree as it means there is less to download on the client die. It's recommended by services such as YSlow and PageSpeed.
 
You can't strip whitespace around non-block level elements without causing visual glitches (iirc things like thread counts lose spacing on forum home)

Also it's overall not a good idea to do this with PHP as it's too slow - best left to something like ngx_/mod_pagespeed where it can be done efficiently enough to be worth it overall

Feel free to copy the code in http://xenforo.com/community/resources/xf-optimise.118/

I hadn't thought about the issue with non-block level elements. I'll have to think of a way to expand the code to work in those instances.
 
You can't strip whitespace around non-block level elements without causing visual glitches (iirc things like thread counts lose spacing on forum home)

Also it's overall not a good idea to do this with PHP as it's too slow - best left to something like ngx_/mod_pagespeed where it can be done efficiently enough to be worth it overall

Feel free to copy the code in http://xenforo.com/community/resources/xf-optimise.118/
Just noticed that while running it on my site.
 
I m getting this error on server error log

Fatal Error: Maximum execution time of 30 seconds exceeded
Today 04:49 - library/Minify/HTML.php:113

ErrorException: Fatal Error: Maximum execution time of 30 seconds exceeded - library/Minify/HTML.php:113

Why ?
 
Strange, that's a class shipped with XenForo. It's taking too long to execute the minification process.
 
Top Bottom