Nir
Nir

Reputation: 25369

serving gziped files only - a good idea?

I have a web service that serves widgets. For scalability sake I want to keep gzipped versions of the js files on Amazon S3. The thing is that browswers not able to accept gzipped files will not be served.

Anyone know where I can find statistics to know how many of the potential users will not be served? Is it a good idea in general?

Upvotes: 2

Views: 744

Answers (2)

karim79
karim79

Reputation: 342755

Yes it is a good idea - as far as I know all modern browsers accept gzipped content. One thing you can do to prevent older browsers from being served gzipped content is to tell the web server to not gzip the output for such browsers. Here's an apache example (excerpt from a .htaccess):

AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application
/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

Upvotes: 4

Matthew Scharley
Matthew Scharley

Reputation: 132464

See this page from the mod_gzip pages. It has a breakdown of which browsers support what.

Upvotes: 5

Related Questions