Opera’s stubbornness and terrible JavaScript support?

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 Web

Not 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.)

Example

To 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 action

Opera 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.

Advertisements

20 thoughts on “Opera’s stubbornness and terrible JavaScript support?

  1. I often hear that Opera has terrible JS support, but when I ask what exactly is wrong, I get only vague answers and excuses… or an example of horribly bad pseudocode that shouldn't work anywhere.

  2. …when we use the 'report this site' menu option? Who at Opera has the unfortunate task of looking at broken webpages & hideously mutated code all day?

  3. When you say "absolute spoofing," referring to the ua.ini feature in 8.0, has it been confirmed that a true IE string will be sent rather than the one with "Opera" in it? If so, I hadn't heard that yet (and I don't think it's that way in the latest beta), but if so, great.

    Of course, even if that it is implemented, if a site really wants to tell what browser you're using, there are ways.

  4. Absolute spoofing will be available, which means that "Opera" will not be visible in the useragent string.

    Now, if the site goes out of its way to detect Opera even when absolute spoofing is used, then there isn't much one can say. The time they spent trying to block Opera could have been spent on testing the site in Opera in the first place. If the site is added to ua.ini, it will be functional as long as Opera is allowed to access the site, so all the webmaster really needs to do is to remove the part of the script that sends Opera broken code.

  5. I don't know if all site reports will be read, but we already have staff going through all bug reports reported at bugs.opera.com. Every single bug that is reported at bugs.opera.com will be read by a person. So if needed, we'll probably have people to do the same with "report this site".

  6. Is soofing going to hide window.opera? This might be needed (maybe even independently of ua spoof) to hide O7/O8 from outdated sites serving hacks for O6.

  7. I suggest doing it by additional greyed-out line appearing below existing ones in Quick Preferences only if auto-spoofing is used for the viewed site.

    Also, the ability to override or switch off totally auto-spoofing would be very much helpful when debugging.

    Without visual notification nor ability to switch it off we must look in ua.ini everytime we want to be sure that site is correctly done. It is an important knowledge for some people, although maybe not for typical end users.

  8. Why doesn't Opera go the Netscape way,and add an option to render a page using the Ie engine if it isn't displayed properly?
    Is there any possibiliy of that happening?

  9. > Why doesn't Opera go the Netscape way,and add an option to render
    > a page using the Ie engine if it isn't displayed properly?
    > Is there any possibiliy of that happening?

    Not a chance 🙂

    For one, Opera is a cross-platform browser, while IE isn't. And we've got enough to do making sure Opera is secure, if we aren't going to have to start worrying about IE vulnerabilities being available through Opera too!

  10. Interesting article, but completely contrary to my experience.I just downloaded the old Opera version 7.23, the "live" version at the time this article was written, and ran it on my website that a customer (still using Opera 7.23) complained about not working properly. Sure enough, the JavaScript did not work properly in Opera for form processing – autofill the "ship to same as billing address" fields and other form submit aspects. I THEN implemented browser sniffing for the first time, and disabled several JavaScript features if the customer is running Opera and now it works fine, though with less functionality.Therefore, I must conclude that, at least for the version of Opera that was being distributed at the time this article was written, "Opera has terrible JS support," and I will go further and point out that rather than address the problems promptly, Opera programmers decided to blame others for their shortcomings — for example, this article.Sorry Opera defenders, a spade is a spade.

  11. I believe I addressed this when I wrote the following:"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!"Apart from that, a single bug/problem does not "terrible" make in my book, but thanks for the anecdote! My experience with sites that are problematic in Opera is based on several years of looking into these kinds of problems, though.The point I was making with this blog post was that Opera does not and has never refused to handle broken or non-standard code.

  12. The article to which you linked (http://www.scss.com.au/family/andrew/opera/compatibility/sniffers/) does a fairly good job of describing the problem of browser sniffing, but its approach to the solution is terrible. Take the code: if(is_ie) { myvar = document.all['someid']; } else if(is_nav) { myvar = document.getElementById("someid"); }It sounds to me as if Andrew Gregory is suggesting that instead, something like this should be used: if(is_ie) { myvar = document.all['someid']; } else { myvar = document.getElementById("someid"); }… or perhaps even this: if(is_ie) { myvar = document.all['someid']; } else if(is_nav || is_opera) { myvar = document.getElementById("someid"); }… although I think that was just ambiguity on his part. None of these solutions are ideal. The best way to perform this sort of check is to check for the feature itself, rather than browsers known to have it; for example, the above code _should_ be rewritten as: if(document.getElementById) { myvar = document.getElementById("someid"); } else if(document.all) { myvar = document.all['someid']; }… or to abbreviate somewhat: myvar = document.getElementById && document.getElementById("someid") || document.all && document.all['someid'];

  13. I do not care, what causes the problems with Opera. I just want to use a browser. I have been using Opera since the very first public release and still waiting for solving the compatibility issues. On my complaints, the Opera representatives advise to use "identify as Firefox" configuration settings. It had never worked, I've tried it hunreds times.

  14. Originally posted by dgaid:

    I do not care, what causes the problems with Opera. I just want to use a browser. I have been using Opera since the very first public release and still waiting for solving the compatibility issues.

    They are solving lots of compatibility issues all the time. You would have known that if you spent more time educating yourself, and less time attacking Opera. But the web is constantly changing, and a fix for one compatibility issues might cause problems somewhere else.So as you can see, compatibility is insanely complex. You would have known that if you bothered to educate yourself.Originally posted by dgaid:

    On my complaints, the Opera representatives advise to use "identify as Firefox" configuration settings. It had never worked, I've tried it hunreds times.

    That's because "identify as" isn't enough. You need to mask as.

  15. On some sites Masquerade as Firefox doesn't work nonetheless.I have tried on http://info.puppetlabs.com/register-downloadI have Masquerade as Firefox enabled, opera versionVersion11.10Build2092PlatformLinux – Ubuntu 10.10 to be exactSystemi686, 2.6.35-28-generic-pae The same site works fine in Firefox 3.6Any thoughts on this would be welcomed !

Comments are closed.