Question

I am displaying a svg in IE. Following are the modes Browser mode: IE9 compatibility view Document mode : Quirks

SVG do not get rendered.
Is it possible to render SVG using this modes ?

Was it helpful?

Solution

It depends on the IE version you're using, and on the type of quirks mode.

Let's start with the obvious: IE8 and earlier don't support SVG at all, so obviously they won't give you SVG in quirks mode either.

IE9 does support SVG, but quirks mode disables it (along with lots of other features), and thus the answer is still "No" for IE9. This is because Quirks mode is designed to be effectively a backward-compatibility mode to simulate IE5. Most features introduced since IE5 are disabled when you're in quirks mode.

From the question, it sounds like you're using IE9. That's the case, the answer is 'No', and you can stop reading now.

IE10 and IE11 are a bit different, in that they actually have two different quirks mode. The old quirks mode is the same as before, so SVG won't work with it. But the newer quirks mode does not disable all the modern browser features like before, it just changes the layout mode, so in this version of quirks mode the answer might actually be 'yes you can'.

The trouble is, that I can't predict which of those two quirks modes your IE10/11 users will be in. The rules for deciding which one IE will use are a bit too complex to go into here, but the short version is that if you're on a corporate intranet and forcing quirks mode for backward compatibility reasons, you're probably in the old IE5-compatibility quirks mode. Which means the answer again is "No".

If you're in the newer quirks mode, then you may be able to use SVG and other modern features. But there's a lot of 'if's to that, and frankly if you're in that mode then it's usually pretty easy to switch to standards mode anyway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top