Linksku
Linksku

Reputation: 1459

Does Firefox 4 have issues with GZip?

Many people recommend that you use the following code in .htaccess for GZip:

AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css 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

Why does Firefox 4 need an exception? Or am I misunderstanding the code?

Upvotes: 1

Views: 353

Answers (2)

Boris Zbarsky
Boris Zbarsky

Reputation: 35084

"Mozilla/4" would match things like Netscape 4 and IE 8 or earlier. It doesn't match any modern web browser (IE9, all Gecko-based browsers, Safari, and Chrome all use "Mozilla/5" while Opera uses no "Mozilla/something" token at all).

Upvotes: 0

Mauricio Scheffer
Mauricio Scheffer

Reputation: 99750

Mozilla/4 != Firefox 4

In fact, Firefox 4 uses Mozilla/5 as part of its user-agent. For historical compatibility reasons (see this), most (all?) web browsers identify themselves as Mozilla (other tokens in the user agent can be used to tell Safari from Firefox from IE, etc)

Upvotes: 3

Related Questions