Skip navigation.

exploreopera

| Help

Sign up | Help

Opera 10 is too old!

, , ,

Not that Opera have released version 10 (yet!), but it looks like at least one site is going to reject Opera when they do. And where there's one site, no doubt there's hundreds of others :frown: Thankfully, a quick search doesn't quickly turn up anything similar, although there are plenty of other bad examples.

Anyway, here's the problem code:
if (navigator.userAgent.toLowerCase().indexOf("opera") != -1)
{
   isOpera = true;
   i = navigator.userAgent.indexOf("Opera") + 6;
   v = parseInt(navigator.userAgent.substring(i, i+1));
   if(v < 7)
      isOperaOld = true;
}
Need a clue? The substring will return exactly one character.

If you're one of those people irritated at how poorly Opera appears to handle web site scripting - this is one of the bigger reasons. It's straight-out careless programming without thought.

I'll mention that the site in question isn't delivering bugs to just Opera. Their corresponding IE code had the exact same problem, except that IE is quite a bit further away from version 10 than Opera.

The problem remains for Opera:
  1. Opera release version 10.
  2. Web sites stop working in Opera, all other browsers work fine.
  3. "Opera is a crappy browser, never works!"
Yet, where is the bug? What should Opera do about it? Never release a browser with a version where the first digit is between zero and six inclusive? Will the Opera after 9.5 be 70.0? :insane:

My New AvatarOpera 10 is too old! Again!

Comments

avatar
We could try hexadecimal? Opera A! doesn't work though :frown:

By alexremen, # 12. May 2008, 00:18:56

avatar
Opera X? *g*

and what is about making a "new produkt"?

By mabdul, # 12. May 2008, 13:58:24

avatar
Flash actually has the same problem, Flash 10 is recognized as "1" and the site wants > 5 :frown:

By larskl, # 16. May 2008, 10:34:43

avatar
Opera 2010? *g*

In these days software isn't allowed to reach the version 10 o.O really crazy. 7 years ago i wouldn't wonder, but today...

By mabdul, # 17. May 2008, 10:16:59

avatar
"Opera A" -> parseInt("A") -> version 0
"Opera X" -> parseInt("X") -> version 0
"Opera 2010" -> parseInt("2") -> version 2

All too old! p:

Please comment using a more recent browser! :D

By Andrew Gregory, # 17. May 2008, 12:47:57

avatar
o.O

By mabdul, # 17. May 2008, 18:52:26

avatar
simple.
have opera auto-detect that code and have it return a nine.

By simo93, # 14. June 2008, 11:13:02

avatar
@simo93: Yeah, simple as that. Except it's not simple.

By _Grey_, # 14. June 2008, 11:32:44

avatar
How about Opera 9+1.0 ? P:

By anime4christ, # 18. June 2008, 01:00:38

avatar
I've got a better idea: broken web pages should BREAK! Genius idea eh? I hear the entire software community has to deal with issues on rare occasion.:whistle:

By jabcreations, # 14. July 2008, 18:57:59

Write a comment

You must be logged in to write a comment. if you're not a registered member, please sign up.

July 2008
SMTWTFS
June 2008August 2008
12345
6789101112
13141516171819
20212223242526
2728293031