Friday, 11. March 2005, 12:02:42
A fairly common criticism of Opera is that its JavaScript support is severely lacking, and that Opera Software refuses to address this because Opera only renders standards compliant code, and Opera Software is not going to do anything about it. Period. Indeed, Opera Software is seen by some people as a company completely out of touch with the real world. They base these comments, not on facts or actual official statements from Opera Software, but on comments they've heard from others saying the same thing. They, again, have heard it from others who heard it from someone else, and so on.
Both of these claims are, of course, completely false.
Opera and The Real WebNot only does Opera render badly coded pages (including non-standard JavaScript), something which is necessary to work on the Web as it exists today, it even has a
rendering mode specifically to deal with non-standard code. Yes, Opera Software actively promotes open standards, but at the same time, everyone must realize that a browser which doesn't handle bad code won't work on most sites. In an ideal world, all browsers would stick to standards, but unfortunately, the Web was not made that way.
Now, then, having established the fact that Opera does indeed handle bad and non-standard code, as much any browser used for today's Web pages, why do some pages still fail in Opera?
Who's to blame?First of all, Opera, like all software, is not perfect. It can make mistakes! If a site doesn't work, it could be because of a bug in Opera, so please
report problems so that they can be looked into!
However, in my experience the single biggest cause of non-working sites in Opera today is browser sniffing. What this means is that if a site isn't working, it is likely because it detects Opera, and then sends it code which differs from what the other browsers are getting. If only Opera had gotten the same as everyone else, it would have worked! This means that it is not Opera which fails because it has limited capabilities, or because Opera Software is stubborn. It is the site which actively looks for Opera, and then sends it broken code, or simply
leaves out important parts.
Why they do this, I do not know. Some sites just give you a "browser not supported" page, while others fail silently, not telling you anything. They do their trickery in the background, giving the impression that it is Opera which is lacking, when it is in fact the people who coded the page who fouled up. (If you want a more technical explanation, have a look at
Andrew Gregory's page about browser sniffing.)
ExampleTo illustrate my point, let's have a look at
MSNBC's Web pages. If you visit the site with other browsers, you will be able to hover the menus to the left to get sub-menus. Try the same page in Opera, and what happens? The menu seems to be broken! One might be quick here to curse Opera for its terrible JavaScript support, and just leave it at that. Or one might investigate further to see what
actually happens: The page discriminates against Opera.
I will avoid technical explanations, and simply explain how you can verify this yourself. By using a proxy to completely hide the fact that you are using Opera, the page will send you the same code other browsers get. Now, the menus will work fine in Opera! If you have the time, you can verify this yourself by
using the Proxomitron to identify as Firefox (thanks to Andrew Gregory again).
The bottom line is that if only MSNBC had sent the same code to Opera as everyone else gets, it would have worked fine.
Taking actionOpera Software is actively working on contacting sites that block Opera, to convince them to make the often tiny adjustments necessary to make it work in Opera. A large and well known webmail provider fixed their broken pages by replacing "Opera" in their scripts with "xyz". It was a hack, but it worked.
You, too, can help! If a site doesn't work in Opera, contact the webmaster, and
tell other Opera users about it.
In some cases, short term solutions are necessary to make sure important sites work, even if they have decided to block Opera. The next version of Opera, 8.0, will have two interesting features to help compatibility:
- A "Report a site problem" menu which lets you report sites that don't work in Opera
- An automatically updated list of sites that require normal or absolute spoofing (completely hiding Opera)
It is unfortunate that Opera's customers and users have to be inconvenienced by designers who apparently don't know what they are doing, or worse, know exactly what they are doing, and promote this kind of behaviour. But one thing's for sure: They can't blame Opera's "terrible" JavaScript support. Others are supporting Opera just fine, so that excuse simply doesn't cut it anymore.