Breadcrumbs

Why Browser Sniffing Sucks

Since I now have most of my family using Opera, I am hearing more and more about browser sniffing issues with Opera. They tell me that some website will not work for them, so I investigate the issue and, after telling Opera to identify itself as a different browser, I get into the website fine without any rendering or scripting issues to be found. Really, browser sniffing has no place on the web whatsoever. Why would you deny users access when their browser can render the website perfectly?

Now, there are cases where browser sniffing is acceptable, but only when to apply fixes or alternative code to a specific web browser, not to allow or to deny specific access. For example, it is okay to sniff out Safari if you need to apply a few CSS fixes for that browser only. However, it is not acceptable to allow only Internet Explorer and Firefox to access your website, issuing a blanket ban for all other web browsers.

Most of the cases of Opera being blocked result from the website only allowing access to certain browsers, not because the website is specifically blocking Opera. This blanket ban of any browser that isn't x nor y is ridiculous! Most of the cases of browser-based blocking I've encountered are a result of these blanket bans. Opera tries to remedy the problem by allowing you to identify Opera as another browser (such as Firefox or Internet Explorer) for specific websites, but it doesn't always work and it shouldn't be necessary.

Another browser-detection problem has recently popped up with the alpha release of Opera 10. No browser has a double-digit version except Opera. This serves as the root of the problem. A number of browser-detection scripts turn the double-digit version number of "10" to "1", cutting off the second digit. Therefore, the script identifies Opera 10 as Opera 1.0 and, hence, blocks the user. Ironically, Opera 10 adheres to web standards better than any other browser available on the market. This browser-detection problem appears to be pretty widespread with websites like Microsoft's Live Mail and Bank of America mistakenly blocking Opera 10. Again, this just shows the absolute ludicrousness of blanket-browser blocking.

Josh Catone, of SitePoint, explains the problem (external link) pretty well:

Quotation by "Josh Catone"

Unfortunately, this reflects poorly on Opera, even though it is the fault of shoddy programming on the part of some web developers. Many users will undoubtedly blame the problem on Opera when the same sites works perfectly in other browsers. In reality, though, this isn't Opera's fault.

Basically, blanket-browser blocking is ill-thought-out and foolhardy. Of course, I just add that to the endless list of web practices the masses do that are fundamentally wrong. Oh well.

Comments

  • Nice rant. I laughed when I heard about the Y2K sytle error in some websites browser protection. Shows how lazy programmers can be sometimes.

    Posted by Matt Oakes (external link) on Wed 24 Dec 2008 at 2:42