The introduction of Internet Explorer 10 has an impact on Visio’s Save As Web output when you specify VML as the primary output format. In this post, I’m going to look at what’s changed and how you can work around the problem.
What is VML?
Vector Markup Language (VML) is an XML based format for describing vector graphics. The standard has been supported by IE since version 5 and has been one of the key Save As Web output formats for some time. While SVG has also been available as a Save As Web output format, the surrounding pan and zoom and Shape Data functionality that’s integrated into the solution has meant that’s continued to be a popular choice.
What’s your document mode?
Back in the days when html was still young most browser vendors took a view on how to render markup that might otherwise have ‘broken’ the page. They introduced their own approaches to solving rendering issues and a great deal of content was produced based on this knowledge. These days everyone’s a little more standards based, but in order to provide some backwards compatibility most browsers offer a ‘Quirks’ mode for rendering older non-standard documents. There are a number of other document rendering modes such as Standards, Almost Standards, Edge etc. and as a page author you can choose which one you want the browser to implement.
IE8 introduced a further aid to determining document mode, allowing the author to include a X-UA-Compatible meta tag within the head element to direct IE which mode to use.
If the X-UA-Compatible meta element is not found IE then goes on to look for a <!DOCTYPE> element and tries to parse this to determine which document type definition to use. If that’s unsuccessful, then the document is automatically rendered in Quirks mode.
As far as Visio’s Save As Web output is concerned, html pages have always been generated without a doctype element and so they have always been rendered in Quirks mode. Up until IE10, this has worked perfectly well.
How does IE10 deal with VML?
VML is no longer supported in IE10 under the following documents modes
- Quirks mode
- IE10 Standards mode
If you display an untouched Save As Web page that utilises VML, none of the drawing is visible. This just means that you need to make a change to ensure the correct mode is selected.
So the workaround for this is to add the meta element as follows:
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=8" >
IE should now render the document in the IE7 or IE8 Standards mode and so the VML will be visible once more. I say ‘should’ because there are a number of other factors that impact document mode, for example an HTTP X-UA-Compatible header and various IE Compatibility View settings, but generally this should work.
If you’re interested in the idiosyncrasies of browser doctype handling then there’s a great article – Activating browser modes with Doctype, by Henri Sivonen. Also, for background on ‘Defining Document Compatibility’ in IE.