Can i over-ride IE enterprise mode from HTML?

2019-08-27 03:49发布

I'm trying to run a D3 Visualisation. I'm hosting my HTML/CSS/JS on an internal company sharepoint site that has IE enterprise running which is forcing me from IE11 into an IE8 environment per my console:

HTML1122: Internet Explorer is running in Enterprise Mode emulating IE8.

My understanding is that the d3 SVG graphics are not supported at all in IE8. I've tried over-riding with this meta tag at the very top of my <head></head> section to no avail:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

I doubt I can have the browser settings changed. Is there any other way to override from my HTML?

This question seems to address the same issue. But offers no solution without being a network admin. I'm not going to be able to have my site removed from the Enterprise Mode list. So hoping to explore potential work arounds a little further..

1条回答
【Aperson】
2楼-- · 2019-08-27 04:27

Your understanding is correct; D3 will not work in IE8.

Unfortunately, you are also stuck with your corporate settings, and if your meta tag isn't working, then no you won't be able to override them.

Solutions:

  1. Host the site outside of your corporate network. The settings that force IE8 mode only apply to sites inside the network, so if your site is hosted externally then IE11 will behave just like IE11 should, and just like it does for other external sites. If you can't get it hosted completely out of the network, you firewall may give you a DMZ that you can use, or you could use a proxy either of which which allow the site to appear to be outside the network, which would have the same effect.

  2. Use a different graphics tool
    D3 is not compatible with IE8 because it uses SVG which is not available in IE8. However, IE8 does include a proprietary vector graphics language called VML which is effectively the same thing as SVG. A number of older SVG libraries such as Raphael supported IE8 by implementing their functionality in VML as well as SVG. I haven't used IE8 for some time, so I can't comment on recent versions of any of these, but Raphael certainly worked well for me at the time.

  3. Use a compatibility layer to make D3 work A library called R2D3 exists which was written explicitly to add compatibility for IE8 to D3. It does exactly as per the above, and translates D3's SVG output into VML. However, as you'll note on the project page I linked to, this is a dead project and is absolutely not supported by the authors, to the point that they explicitly tell you not to use it.

查看更多
登录 后发表回答