miscoded

the web is a hack

MS' Virtualearth claims Opera has no SVG support

, , , ,

As seen in this discussion, the BBC site uses a map from maps.live.com - and all we Opera users get is an error message:

We're sorry but your browser does not support BBC Sport's Olympic map.



Looking into it, first there is some Opera-sniffing from the BBC itself that detects Opera and displays the warning instead of the map.

With that sniffing neutralised, the map loads - but shows the United States, not Beijing. Come one Live Maps, admit you're wrong by several thousand kilometers.. Or?

Not in the mood to admit any fault, the script instead spits out an error laying the blame on us:

JavaScript - http://news.bbc.co.uk/sport2/hi/olympics/7493757.stm
Timeout thread: delay 10 ms
Error:
name: Msn.Drawing.Exception
message: Your Web browser does not support SVG or VML. Some graphics features may not function properly.
stacktrace:   Line 1 of linked script http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1


So, my web browser does not support SVG, eh? Let's have a closer look at how you figured that out..

if(document.all)
         return new Msn.Drawing.VMLGraphic(e,b);
else{if(navigator.userAgent.indexOf("KHTML")!==-1)
         return new Msn.Drawing.SVGGraphic(e,b);
var c=0,f=0,g=new RegExp("Firefox/(.*)"),d=g.exec(navigator.userAgent);
if(d&&d.length>=2){
         var a=d[1].split(".");
         if(a){c=a[0];
         f=a[1];
         if(parseInt(c)>0&&parseInt(f)>=5||parseInt(c)>=2)
                  return new Msn.Drawing.SVGGraphic(e,b)

         }
}
throw new Msn.Drawing.Exception(L_GraphicsInitError_Text)


Yes, nothing but browser sniffing.. Not a single attempt at intelligent feature detection. Basically, by claiming Opera doesn't support SVG and can't load the map Microsoft is lying to the BBC and to our users.

Hotmail has classThe holy wars of the humble alt

Comments

Hallvord R. M. Steenhallvors Wednesday, August 20, 2008 7:30:23 PM

Some suggestions for SVG detection:

document.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#SVG', 1.1)

typeof window.SVGDocument != 'undefined'

document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).toString() != document.createElementNS( 'http://www.w3.org/2000/svg', 'Svg' ).toString()

Charles SchlossChas4 Wednesday, August 20, 2008 8:23:57 PM

waiting on Microsoft to change wait (the song waiting on the world to change)

João EirasxErath Wednesday, August 20, 2008 10:27:06 PM

unbelievable.. I'm stunned... faint

So incredible... MS has to have the most incompetent programmers ever working for them...

Hey Opera, why not sueing MS in an american court by stating that MS is deliberately misleadingusers andfuding Opera ? p

Hallvord, please ! Browser js patch before the Olympics end.

Charles SchlossChas4 Thursday, August 21, 2008 12:58:49 AM

@ xErath it is already going on now

Opera tells EU that Microsoft's IE hurts the Web:
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9052982

Update: Microsoft to appeal $1.3B EU fine:
http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9084578

The US already tried Microsoft for Monopoly stuff, there is an artilce on wikipedia:
http://en.wikipedia.org/wiki/United_States_v._Microsoft

Charles SchlossChas4 Thursday, August 21, 2008 1:05:40 AM

Also sending lots of feed back on this page about Opera may help
http://office.microsoft.com/en-us/help/HP010407651033.aspx

Strength in numbers yes

dapxin Thursday, August 21, 2008 5:28:16 AM

BBC + Microsoft et al. Liars !

namedduenker Thursday, August 21, 2008 5:59:45 AM

And there i thought the SVG-Feature had been taken out of opera since i last checked lol

DavidSchalandra Thursday, August 21, 2008 7:27:52 AM

The more I'm thinking about it, the more I want to create an SVG-only website. wizard
Don't you know you're talking about a revolution
It sounds like a whisper...
(Tracy Chapman)

Interesting article, well worth digging it. up


http://digg.com/software/MS_Virtualearth_claims_Opera_has_no_SVG_support

MyOpera team, please fix this!fearphage Thursday, August 21, 2008 8:10:49 AM

It is sad to see browser detection lead to false stayments. "We don't support your browser" is a lot different than "your browser doesn't support technology X".

Miladin MiladinoskiEagleMKD Thursday, August 21, 2008 3:41:18 PM

What more have you expected from Microsoft? I mean, Opera software sued them and now they are paying back the bill.

Charles SchlossChas4 Thursday, August 21, 2008 3:59:39 PM

IE 8 may help with the issue if they have better standards support, and more people yaping at Microsoft for poor web coding then just maybe we will see a better web wait

malsumis Friday, August 22, 2008 10:36:47 AM

I'm sorry for posting it here, but...

I've been using Opera for years and years, but this is getting mildly annoying. Opera is perfetly capable of displaying any webpage on the net(unless it's intentionally broken or sth), and I don't believe that it has more bugs than any other browser on the market, but stories like these make me go and weep. I mean, the ignorance is enormous, what are they thinking?

I ask, what can be done to avoid such situations in the future? Get more users ASAP, especially in the US which think that they're alone in the world and then spread the word on the net, that there are only 1% or less of opera users. Oh, I don't know, a big marketing campagn? Like numerous ads in a newspaper, bilboards and stuff? TV ads?

Hallvord R. M. Steenhallvors Friday, August 22, 2008 2:07:02 PM

I've been using Opera for years and years, but this is getting mildly annoying



Very much so!

We're fighting back though: I'm preparing a browser.js workaround right now, to make sure VirtualEarth enables its SVG features on every site it runs on..

Hallvord R. M. Steenhallvors Friday, August 22, 2008 4:32:08 PM

New browser.js that teaches the VirtualEarth script a lesson about Opera's SVG support (nah, just adds 'KHTML' to navigator.userAgent while running scripts whose URLs contain dev.virtualearth.net/mapcontrol/mapcontrol.ashx) goes live tonight or tomorrow.

This took the size of Opera 9.50 for Desktop's browser.js to 101350 bytes, packing in 152 active fixes. I'd say there is quite a lot of bang for your buck smile

DavidSchalandra Friday, August 22, 2008 4:39:05 PM

Great job! Thanks alot. smile

wizard BANG! yes

Omega JuniorOmegaJunior Saturday, August 23, 2008 2:39:03 PM

The browser.js is a nice feature, correcting the mistakes made by the wilfully ignorant. (Let's not blame the programmers: they probably execute their managers' decisions. I am one of those programmers: I come across this kind of management decisions all the time. It's called 'protecting the investment'.)

Unfortunately, browser.js doesn't teach anyone out there anything. It only shows us and the Opera programmers (like Hallvors) how sick the world out there can be.

So please don't stop the 'Open the web' project, thinking browser.js will take care of it. Granted: it will correct the mistakes... but it won't correct the attitude. Get them where it matters: in their wallet.

Charles SchlossChas4 Monday, August 25, 2008 3:29:09 AM

Browser JavaScript Explained:

http://www.opera.com/docs/browserjs/

allenjs Tuesday, August 26, 2008 7:51:28 PM

Note that David Storey reported this to the VE team awhile back, and it's filed as bug #214237. They have punted the fix to the next release of VE. Reasoning was that fixing UA detection there would allow the map to draw, but would break panning. Also, they reported that since newer versions of Opera stopped reporting document.all == null, more things break in Opera (because before they would use document.all which would "just work" in Opera since they would send FF code). Anyway, I would have liked to see the fix in this release, and I hope they focus on full Opera compat for next release, but just letting you know the VE team knew about the issue.

João EirasxErath Tuesday, August 26, 2008 8:53:21 PM

@allenjs that good and bad, good because they are aware and will fix it, bad because they knew it and didn't fix it before.

Write a comment

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