The Problem with User Agent Detection

If you have ever used a no-so-popular web browser, a beta version of a popular browser, or a mobile browser on a phone or tablet, you have likely encountered a few websites that insist your browser and/or operating system will not work on them.  In some cases, they are correct, but in most cases, the culprit is a user agent detection script that wrongly assumes your browser is incompatible.

At one time, many webmasters believed they only had to write code for one web browser, rather than coding to web standards.  They created websites and proudly displayed a “best viewed in…” disclaimer, essentially telling users of alternative browsers to shop elsewhere.  Some institutions  took it a step further, forbidding other browsers to even access their sites.

In those cases, the websites probably still reached 95% percent of their users.  Those days, however, are long gone, and there are numerous browsers for both computers and mobile devices on the web.  Because of this, a detection system that relies on user agent identification is flawed.

Assuming you have put in a great amount of money and effort into your dedicated server, you want your websites viewed by as many people as possible.  User agents often only tell part of the story.  For example, Google Chrome and Apple Safari are two different browsers, but they use the same rendering engine: Webkit.  There are also several lesser-known browsers that use the same engine.  In most cases, they will all display a website in the same fashion.  Furthermore, it is impossible to account for all browsers and to know which ones will actually be compatible and which will not.

If you are truly worried that your high-tech sites may not be viewable in some browsers, a better solution is to provide an alternative version of each site.  This is increasingly important for mobile devices.  Denying them access should not be something you even consider.

Related Posts











Comments: