The personal Blog of Chris Dempsey

Chris is a web developer working freelance in Ayr nr Glasgow, Scotland. Other business interests include Underground Grapics, a company that manufactures vinyl decals for modified cars.

Monday 7 September 2009

Firefox 3.5.2 Content Encoding Error

Came across an error with one of our newly launched websites recently where Frefox 3.5.2 was reporting:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
  • Please contact the web site owners to inform them of this problem.
The website does use gzip compression so initially I thought the encoding error was something to do with the compression routine. Internet Explorer 7 gave an even less helpful generic error message suggesting that the machine might not be connected to the Internet.

Google is full of similar issues which were caused by a bug in the 3.0.3 release of Firefox.

Opera 9.64 came to the rescue displaying the actual error which was related to a PHP switch statement used to set a Google Map API key outputting an error message before the gzip compression routine ran which meant we were attempting to send the headers after page content had been output.