Testing your website now could save you trouble down the road

Jan 23, 2012 10:41 GMT  ·  By

Firefox is about to go through a major milestone, a symbolic but important one nonetheless, its version number will get two digits with the release of Firefox 10 to the stable channel, i.e. the one that most people are using.

With this comes a surprising but noteworthy issue though, some user agent (UA) detection scripts may not have planned for this and may not be able to parse or will simply act unpredictably when detecting a two-digit version number for Firefox.

"We all know it: UA-based browser detection is bad, the right way is feature-detection. Regardless, legacy code relies upon UA sniffing and may need to be updated for Firefox 10′s release," Mozilla's Jean-Yves Perrier wrote.

"Old scripts often made some undue assumptions. Some are assuming that browser version numbers will never reach 10… This is not the case: Opera and Chrome have already crossed this landmark long ago, Firefox will reach it next week and IE soon after," he explained.

"So, it is the last moment to check your UA-based browser detection code before your site goes havoc!," he urged developers and webmasters.

Less than a year ago, a new Firefox was coming out every year or year and a half. It took seven years to get to Firefox 4, so many websites assumed that it would be years before Firefox 10 came out. That's no longer the case.

Mozilla has some simple advice for checking out whether your sites work properly with the new version which is a week away from launch. The simplest way of testing your sites is to get the Firefox 10 beta and see what works.

Of course, going through the website code is useful as well. Checking for UA browser detection code is a simple way of discovering old code that may not handle two-digits or may not even be needed anymore. The same goes for libraries used.