As prescribed by Yahoo!, gzip'ng files would make your websites load faster. The problem? I don't know how :p
-
Do you have a reference for Yahoo saying that gziping files will make websites load faster? Generally speaking, web browsers can't load pages or images that are gzipped, except to download them to your computer. – Ian Varley Nov 17 '08 at 06:05
-
That's not true: http://en.wikipedia.org/wiki/Gzip#Other_uses – Jim Puls Nov 17 '08 at 06:33
-
1http://developer.yahoo.com/performance/rules.html#gzip Here you are – Teej Nov 17 '08 at 06:57
9 Answers
http://www.webcodingtech.com/php/gzip-compression.php
Or if you have Apache, try http://www.askapache.com/htaccess/apache-speed-compression.html
Some hosting services have an option in the control panel. It's not always possible, though, so if you're having difficulty, post back with more details about your platform.

- 6,269
- 2
- 35
- 34
If you are running Java Tomcat then you set a few properties on your Connector ( in conf/server.xml ).
Specifically you set:
- compressableMimeType ( what types to compress )
- compression ( off | on | )
- noCompressionUserAgents ( if you don't want certain agents to receive gzip, list them here )
Here's the tomcat documentation which discusses this: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

- 4,946
- 1
- 32
- 35
Edit your httpd.conf file.
Add this line to load the module:
LoadModule deflate_module modules/mod_deflate.so
Add these lines to actually compress the output:
AddOutputFilterByType DEFLATE text/css text/html application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

- 2,732
- 1
- 20
- 18
Jetty will look for gzip'd versions of static files, as well as it has a GzipFilter for dynamic content.
You could probably pull the GzipFilter over into Tomcat if you wanted more control over compression than just Tomcat's connector-level compression...

- 266
- 4
- 5
Gzip compresses your webpages and cascade style sheets before sending them over to the client browser.
This drastically reduces transfer time since the files are much smaller.
There are different methods of setting up gzip compression depending on whether or not you've got an IIS or Apache server
Example: this link.

- 1,910
- 3
- 18
- 27

- 11
- 1
Seeing how most answers here are almost 5 years old, here's some very current and up to date example references.
For example server configs that enable gzip/deflate type compression for iis
, lighthttpd
, nginx
, and even node
see: https://github.com/h5bp/server-configs
For a very good current implementation of Apache mod_deflate
see
https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess#L156

- 10,437
- 2
- 40
- 57
Gzip compresses your webpages and cascade style sheets before sending them over to the client browser other example this link
http://developer.yahoo.com/performance/rules.html#gzip
This is the reference if any asks me about my reference loading gzipped files

- 12,764
- 9
- 72
- 93
-
don't write that as an answer but edit your question. this is not a forum. – markus Nov 17 '08 at 07:14