enabling gzip compression can be done in the apache config(httpd.conf). this is what you need: <Location /> #turn on gzip SetOutputFilter DEFLATE
# use gzip for AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE image/svg+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/atom_xml AddOutputFilterByType DEFLATE application/x-javascript AddOutputFilterByType DEFLATE application/x-httpd-php AddOutputFilterByType DEFLATE application/x-httpd-fastphp AddOutputFilterByType DEFLATE application/x-httpd-eruby # disable gzip for SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.avi$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mov$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.mp4$ no-gzip dont-vary SetEnvIfNoCase Request_URI \.rm$ no-gzip dont-vary # Disable gzip for dl.php(download script) # SetEnvIfNoCase Request_URI dl\.php$ no-gzip dont-vary BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary </Location> Don't forget to load mod_deflate: LoadModule deflate_module modules/mod_deflate.so If you don't have access to the httpd.conf then you can also do it with a .htaccess file & 2 php files, but you'll have to use google for that(forgot how to do that, it's fairly easy). Crazy On Jun 11, 5:32 pm, keymaster <[EMAIL PROTECTED]> wrote: > I am currently packing and minifying css/js files for performance. > > I would like to gzip them too, but don't know enough about browsers > and http to know if I need to do something else to get the browser to > unzip before interpreting the css/js files. > > Is anything else necessary? > > Also, does anyone know of any helper available which will > automatically version image/swf files with a timestamp, (similiar to > what Matt Curry's wonderful automatic asset packer/helper does in the > bakery for js/css files)? > > I'd like to be able to safely put a far out expires-header on them, > without worrying about manually > changing image file names every time I want to replace them? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
