Neil Turner's Blog

Blogging about technology and randomness since 2002

Powergen’s browser detect script is b0rked

If you visit Powergen’s site in Firefox, you’re told that your browser isn’t supported. Except it is.
The script looks at the Gecko user agent and then reads the version string at the very end to see if it’s 7.02 or above, as it’s designed for Netscape 7.02 or above. It sees Firefox’s version number (currently 0.10) and rejects it, because it’s less than 7.02. This is despite the fact that Firefox is built upon a newer version of Gecko than NS 7.02. It is, however, fine with classic Mozilla, Opera, Safari and even Konqueror. Should you override your user agent in Firefox, you’ll find the site works fine. I wouldn’t normally kick up a fuss about specific sites but fixing the site would be so trivial I’m surprised no-one’s done it yet, especially considering Firefox’s adoption recently.
Browser detection scripts are usually never a good thing because they always lock out legitimate users whose browsers are configured differently. The best approach is to design your site so that it works on all browsers (although glossing over NS4.x is usually excusable) and then do away with detection altogether. Amazingly enough, designing to web standards achieves this. Funny that.
incidentally Powergen is listed at Defending The Fox, a hall of shame of sites that don’t work in Firefox and contact details for their webmasters.


  1. Well with nothing else to do (isn’t final year easy?) I may as well submit some sites to Defending The Fox.

  2. Suitably blunt message sent via contact form.

  3. Support Firefox!

    I was looking for a new mobile phone and realised that 02’s website refused to let me in, because I was using the latest version of Mozilla Firefox, and not Internet Explorer or Netscape. It also refused to let…

  4. I don’t agree that using standards are currently a viable web design panacea. There are many browser inconsistencies that prevent designers from building a single site for all platforms. Currrently I’m struggling with XML and CSS that is rendered correctly on Netscape and Mozilla but doesn’t work on IE. In this case, standards are preventing me from reaching a majority of my audience.