Blog Post RSS ?

Blogs » News & Trends » Why Opera 10’s User Agent Smells Bad
 

Why Opera 10’s User Agent Smells Bad

by Craig Buckler

Opera 10The Opera browser has continued to evolve and version 10 will be released shortly.

All browsers identify themselves with a unique code known as a user agent. The alpha release in December 2008 used a logical user agent string, e.g. for a Mac in an English locale:

Opera/10.00 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.0

However, all subsequent builds and the final release will use:

Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00

Version 9.8? What’s going on?

Opera is one of the oldest browsers and is the first to approach a double-digit version number. Unfortunately, the Opera developers started to experience strange problems with a selection of sites that use browser sniffing to serve version-specific content and/or scripts. Many of the sniffing scripts simply detected the first digit in the user agent string and boldly assumed they were running on Opera 1 rather than Opera 10. Worse still, many of these sites decided that the browser was unsupported and refused to provide any content.

The Opera team deliberated the site compatibility problem and came up with the best compromise: freeze the first part of the string at 9.80 but append the real version number to the end. v9.80 was chosen rather than v.9.99 just in case there is a need to update the initial version number at a future date.

The same problem is likely to hit Microsoft; Internet Explorer is not far behind at version 8.0, and would probably be there now if the company hadn’t abandoned the browser for 6 years. Mozilla, Apple, and Google may have a little way to go, but Opera’s problem illustrates another reason why browser sniffing is a bad idea … more reasons coming soon…

Would the original Opera 10 user agent string have affected any of your websites?

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Opera 10’s Y2K Bug: Browser Detection Goes Bad If you have fond memories of the Y2K bug, then...
  2. 5 Reasons Why Browser Sniffing Stinks Opera's recent problem with version 10's user agent has brought...
  3. Opera 10 Alpha Arrives Just a month after Opera released the last stable version...
  4. Opera 10 Final Released Opera 10 is the latest and greatest browser from the...
  5. What’s New in Opera 10 (Part 1) Opera 10 is now available as a beta download. In...

This post has 17 responses so far

Sponsored Links

SitePoint Marketplace

Buy and sell Websites, templates, domain names, hosting, graphics and more.

Follow SitePoint on...