Changes in Opera's user agent string format
By Espen André ØverdahlEspenAO. Friday, May 29, 2009 8:01:08 AM
Our latest weekly snapshot identifies itself in a slightly unexpected fashion (as will the beta and final versions of Opera 10). The user agent for Opera 10 (eg Mac platform, English locale) will be as follows:
Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00
Confused? Let us look at this in more detail.
When we released the Opera 10 alpha in December last year, we gave it a Opera/10.00 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.0 user agent string. This was a logical follow-on from previous browser versions, but we soon found out that the Opera/10.00 part was not digested well on a number of sites that deploy browser sniffing to serve version-specific content and scripts. As browsers haven’t been around for a very long time yet, their version numbers have stayed in the realm of single digits thus far; Opera reaching 10 is the first of its kind. It appears that a considerable amount of browser sniffing scripts are not quite ready for this change to double digits, as they detect only the first digit of the user agent string: in such a scenario, Opera 10 is interpreted as Opera 1. This results in sites mistakenly identifying Opera 10 as an unsupported browser, thereby breaking server, as well as client-side scripts.
Browser sniffing — unless you’re writing a web stats application — is always a bad idea. It’s a misguided attempt to send different content to different user agents. This is never scalable — you can’t change every website you’ve ever made every time a new browser version comes out. It is also not future-proof, as highlighted by this article.
It’s important to note that other browsers — including Internet Explorer, which is two versions away from the dreaded 10 number — might face similar problems in the future, unless site administrators fix their scripts.
For those interested in an example, try to load http://www.allocine.fr/video/merciqui/ with our earlier Opera 10 alpha build. You’ll see that after the advertising intro, the Flash video is shown at half the intended height. This is because the browser sniffing script on which the height parameter depends interprets Opera 10 as 1, which results in an incorrect value and a broken layout.
So, after a few months of careful analysis of the impact this Y2K-like versioning problem may have on site compatibility, we’ve decided to freeze the first part of the string as Opera/9.80 for now, and add the version number in the end — hence the Version/10.00 appendix. This construct allows us to somehow serve the real
version number, while sidestepping the various double digit-related issues described above. In future releases, we plan to update the Version part. For example, Opera 11 will have a Version/11.00 appendix, and so on.
For those interested, here is a little note from behind the trenches: for a while, we considered going with Opera/9.99 as it is only 0.01 away from 10, but in the end we settled on Opera/9.80, as this gives us some room for manoeuvre in the future in case we somehow want to update the Opera version number, while still staying below 10. The web is a moving target, so better be prepared for the unexpected!
Feel free to leave any questions you may have in the comment section, and of course, we hope you’ll enjoy Opera 10!
This article was originally posted on Dev.Opera and written by Andreas Bovens.


Tamil # Friday, May 29, 2009 8:16:50 AM
FavDjiXas # Friday, May 29, 2009 8:33:22 AM
*SPAM :-)* http://www.favbrowser.com/opera-970-and-presto-230/
Angelikiellinidata # Friday, May 29, 2009 12:53:59 PM
Ben Tudballtudsta # Friday, May 29, 2009 1:46:51 PM
Originally posted by DjiXas:
I would suspect to avoid any conflict with Opera Mobile 9.70Charles SchlossChas4 # Friday, May 29, 2009 2:47:04 PM
jonpar # Friday, May 29, 2009 11:30:07 PM
Or just "Opera One" ?. Or Opera 2009 ? Or "Opera T" (from ten)
...?
Charles SchlossChas4 # Friday, May 29, 2009 11:59:26 PM
jonpar # Saturday, May 30, 2009 12:15:48 AM
what's the problem ?
or opera T ---> meaning ten
why do you need, right now "opera 10" ?
Madiseestlane # Saturday, May 30, 2009 9:57:00 PM
Scripts are usually made to search for (0-9).x, i.e 8.3. There's no search for letters used in versions.
jonpar # Saturday, May 30, 2009 10:11:42 PM
imagination guys
Charles SchlossChas4 # Saturday, May 30, 2009 11:38:44 PM
jonpar # Saturday, May 30, 2009 11:58:11 PM
i look at other software names, or numbers !!
Charles SchlossChas4 # Sunday, May 31, 2009 12:09:09 AM
others have not been around as long as Opera
jonpar # Sunday, May 31, 2009 12:21:01 AM
i give up
yeeliberto # Monday, June 1, 2009 10:06:53 PM
haha
jonpar # Tuesday, June 2, 2009 12:47:47 AM
Vladimir Georgievvladimirg # Wednesday, June 3, 2009 3:03:06 PM
Based on the detected version number, a sniffing site would generally decide what content to serve to the browser.
If the site sees "9", it would most probably think "Oh, 9 is greater than 8, and Opera 8 was able to handle this nice content. So I will serve this nice content to 9 too."
The user gets the nice content, an everybody is happy.
If the site sees "1" (instead of 10), then the site would think "Opera 1?! This must be a very old browser, not able to handle such a nice content. So I wonty serve any nice content to it."
Similarly, if it was "Opera T", the sniffing site would probably perceive the "T" as "0" (zero), because T is not a digit at all, while the site sniffs for a number.
So were it 10, Ten or Ten-Ten
Thus Opera is forced to fake 9...
jonpar # Friday, June 5, 2009 12:41:07 AM
Since then ...i don't remember wheather they have changed the software or the 10 hasn't been given again
Vladimir Georgievvladimirg # Friday, June 5, 2009 6:19:21 AM