why compatibility mode for intranet sites

人盡茶涼 提交于 2019-12-03 10:45:13

IE makes assumption about displaying intranet sites (http://someInternalSite/ vs. http://someInternalSite.myCompany.org). That assumption is that intranet sites work best in compatibility mode.

It makes the so called "smart" judgement by looking at it this way: Since the website is hosted in internal servers - there must be some corporate legacy applications developed on older versions of IE. And since IE is not perfect at maintaining proper fallbacks to older versions - thus its good to turn on the compatibility mode for the rescue.

To fix it either access the site with FQDN or uncheck a checkbox in “Compatibility View Settings”

More info of the IE "Smart Defaults" on this blog post: http://blogs.msdn.com/b/ie/archive/2009/06/17/compatibility-view-and-smart-defaults.aspx

I have upvoted the other answer, so i'm not really fishing for your vote. I just wanted to add the findings that i had this evening.

I have a state of the art HTML5 website, that works well in every browser. However, in my own local environment IE is messing thigns up like you said, and even worse. I was thinking it was a server issue as the html that was passed as a responsetext from my server was the right HTML. however, IE was parsing it to something different ( I usually think of IE as a great browser, but I really lost it)

this structure:

<header>    
    <div>
        <div></div>    
    </div>
</header>

became this in the DOM:

<header></header>
<div>
    <div></div>
</div>
<header><//header>

As you can see the whole DOM was parsed into something completely different and was not working, thanks to compatibility being enabled for the intranet. I did set the doctype, and validated my site on w3c, so that wasn't the problem either. The bottomline is, compatibility mode is something you want to stay away from as a developer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!