![]() Or, if you don't have access to IIS (don't laugh - it happens) you can fall back to doing this in code like this: That's fine, you can still get the same behaviour by going to the HTTP headers tab in IIS (see below) and adding the X-UA-Compatible: IE=edge header by hand. Maybe you're running II6 and so you making a change to the web.config won't make a difference. Solution 2: Custom HTTP Header the hard way ![]() This will make IIS serve up the above custom response HTTP header with each page. All you need do is include the following snippet in your web config file: If you're running IIS7 or greater then, for my money, this is the simplest and most pain free solution. Solution 1: Custom HTTP Header through web.config You can use compatibility mode to do more than just that and if you're interested in more about this then I recommend this Stack Overflow answer. Just to clarify terms, "solve" in this context means "force IE to render in the most standards compliant / like other browsers fashion it can muster". Recently compatibility mode has come to bite me for the second time (in this case I was building for IE 9 and was left wondering where all my rounded corners had vanished to when I deployed.).įor my own sanity I thought it might be good to document the various ways that exist to solve this particular problem. And I have learned how to get round the intranet default of compatibility mode through cunning deployment of meta tags and custom http headers. Obviously I know now it's not a bug it's a "feature". Wait, what's happened? Where's the new style rendering? What's up with my CSS? This is a bug right? Happy and content, I'd push to our test system and browse to it. All would look new and shiny (well non-anchor tags would have :hover support). I'd fire up the app hosted on my machine and test on my local install of IE 8. Here was I, developing away on my desktop. As a result, a fair number of devs I've encountered have little or no knowledge of compatibility mode. " for Intranet pages, 7 (IE 7 Standards) rendering mode is used by default and can be changed."įor whatever reason, this decision was not particularly well promoted. Later down in the article you'll find this doozy: (emphasis mine) ![]() However, one of the choices made around backwards compatibility I've come to regard as somewhat irksome. Quite right too - good business sense and all that. Microsoft have generally bent over backwards to facilitate backwards compatibility. excerpted from understanding compatibility modes in Internet Explorer 8. Internet Explorer 8 addresses this challenge by introducing compatibility modes which gives a way to introduce new features and stricter compliance to standards while enabling it to be backward compliant. On the other hand, the Web is a large expanse requiring every legacy page to support the "latest and greatest" browser version immediately at product launch just isn't feasible. On the one hand, new features and functionality push the Web forward. To quote them:Ī fundamental problem discussed during each and every Internet Explorer release is balancing new features and functionality with site compatibility for the existing Web. Well it all started when Microsoft released IE 8. What is this "compatibility mode" of which you speak? A Brief History Perhaps a quick history lesson is in order. Because here we're at the mercy of "compatibility mode". (In fact, this was still the case as late as 2012!) Now, because JavaScript is so marvellously flexible I was still able to do a great deal with the help of a number of shivs / shims.īut rendering and CSS - well that's another matter. I spent a fair number of years working for an organization which had IE 6 as the only installed browser on company desktops. Now, unlike many people, I don't regard IE as a work of evil. So we're basically talking IE 9 at best, but more often than not, IE 8. As we all know, enterprises are generally not that speedy when it comes to upgrades. These sort of apps are typically accessed via the company intranet and since "bring your own device" is still a relatively new innovation these apps are invariably built for everyones favourite browser: Internet Explorer. More particularly, web apps built on the Microsoft stack of love ( © Scott Hanselman). For just over 10 years my bread and butter has been the development and maintenance of line of business apps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |