jalmenarez / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Document gzip/deflate usage or add as option #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I read the FAQ on gzip, but frequently mod_gzip/deflate is not an option 
to users, and those modules can cause problems with older versions of IE 
(as recent as 6) and other PHP scripts that deal with headers. It would be 
great to have documentation on a real, working implementation where Minify 
output is compressed.

I rather think this can be done simply and effeciently in PHP via the 
common Zlib extension. See this script (not mine) for a working (though 
spaghetti code) implementation:
http://rakaz.nl/projects/combine/combine.phps

Another problem with leaving this to mod_gzip is that the server would 
have to recompress for every user. For sites with high concurrent users 
this could add up. PHP can cache the compressed version and stream it just 
like the uncompressed.

Steve

Original issue reported on code.google.com by stephen....@gmail.com on 21 Sep 2007 at 4:11

GoogleCodeExporter commented 9 years ago
Hi

I modified the code a bit so that gzip compression is enabled on the scripts 
loader

      $minify->browserCache();
      ob_start("ob_gzhandler");
      echo $minify->combine();

Added that line between and it works like a charm. In fact I am using normal 
source
files for all js library files.

Your script is amazing thanks to you.

Original comment by hmimth...@gmail.com on 31 Jan 2008 at 2:29

GoogleCodeExporter commented 9 years ago
See trunk!

Original comment by mrclay....@gmail.com on 29 Feb 2008 at 2:10