• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Minifier [Deleted]

euantor

Well-known member
#7
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.
 

Luke F

Well-known member
#9
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/
 

euantor

Well-known member
#10
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.
 

MattW

Well-known member
#11
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.
 

maxicep

Active member
#18
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 ?