What are cons of force a web site viewed in IE to patible mode? Say we force IE9 to IE8 patiblity mode?
- Performance drawbacks
- Can't use any new IE9 specific features like HTML5/CSS3/SVG
Why?
We run legacy web app which is developed since 2000 so it's a mess ball fighting to be patible with Chrome, Opera, Firefox, IE6/7/8 and now we decide to add IE9 to the list. But with IE9 we run in issues with printing, "Permission deniend" JavaScript errors (probably something about cross-frame JavaScript calls) and next issues - the easy workaround is to force IE9 to behave as a IE8 and then everything works fine. But I am still not sure if it's way to go...
What are cons of force a web site viewed in IE to patible mode? Say we force IE9 to IE8 patiblity mode?
- Performance drawbacks
- Can't use any new IE9 specific features like HTML5/CSS3/SVG
Why?
We run legacy web app which is developed since 2000 so it's a mess ball fighting to be patible with Chrome, Opera, Firefox, IE6/7/8 and now we decide to add IE9 to the list. But with IE9 we run in issues with printing, "Permission deniend" JavaScript errors (probably something about cross-frame JavaScript calls) and next issues - the easy workaround is to force IE9 to behave as a IE8 and then everything works fine. But I am still not sure if it's way to go...
Share Improve this question edited May 25, 2011 at 13:18 Yi Jiang 50.1k16 gold badges138 silver badges136 bronze badges asked May 25, 2011 at 13:16 Michal BernhardMichal Bernhard 3,8834 gold badges28 silver badges38 bronze badges 4- 1 Your errors most likely stem from using code that specifically targets IE, which is a prime example of why feature detection is superior to browser detection. Also, forcing IE 9 into patibility mode definitely isn't the way to go - IE 10 is just around the corner so ideally you want to be taking advantage of the better performance and improved features from IE 9 and 10. – Andy E Commented May 25, 2011 at 13:22
- Why I should bother about IE10? In our case we don't care about new features, we only care about same user experience for all. Yes we can fix all bugs but it will cost more money than this fix, so I need to know - are there any cons which in the end cause that it will cost more than fix IE9 patibility? – Michal Bernhard Commented May 25, 2011 at 15:30
- The improved features include not supporting getElementsByTagName. That alone is worth upgrading...</sarcasm> – user483040 Commented Jun 24, 2011 at 14:16
- 1 It might be worth investing your time and money on solution-specific fixes based a framework like YUI, or possibly jquery, where browser abnormalities can be normalised. When testing for IE9, we ended up spending.. 3 hours upgrading to the latest YUI release... and all of our woes were solved for free. – danjah Commented Jul 4, 2011 at 10:43
5 Answers
Reset to default 2first our app is public site (for our clients)
You have a public website developed in 2000 and it doesn't work on modern browsers? Deprecate it or re-write it.
Don't hack your code to support modern browsers, the website is clearly poorly written and doesn't apply to standards. You can't get away with this.
The only place where you can get away with this level of inpatibility is intranet applications and even then you should simply state "it works on browser X, live with it"
You can't say that to public facing clients. I mean you can try, but have fun losing business to your petitors.
Re-develop your website to match the W3C HTML/CSS standards and the ES5 standards and it will be pletely future facing (for some years).
Alas, the way the web works is that anything more then 5 years old is deprecated. So either re-write it every 5 years or get out of the web business.
In terms of actually using patibility mode, don't. IE6-8 are horrible engines and should be avoided like the plague. If you use them then you can't write future facing standards pliant code.
Your code needs to match the standards and you should fix / shim / patch any browser specific bugs where those browsers don't implement the standards.
You cannot say you have tested in IE6/7/8/9 until you have tested in those different versions. Emulating the test environment is not the same as using the test environment. To my knowledge IE7/8 patibility modes are the older render engines, not the underlying browser as a whole, bugs and all. It is closed source so you will never know.
Convert Microsoft's free to download virtual disk images for cross-browser testing to Virtualbox images and put them on a machine that just runs Virtualbox. An old machine will do, run the VMs headless and access them with remote desktop. In that way you will be able to test in all browsers without burdening your machine with MS/Spyware.
I believe your system admins can set IE to patibility mode for all intranet traffic using the Group Policy Editor. Any site you create will from this point forward, you can add a meta tag to force IE9 to render natively and use all the newer features...
I'm having to do that on my current project using the following doctype and meta tag in my header:
<!DOCTYPE HTML >
<meta http-equiv="X-UA-Compatible" content="IE=100" />
Compatability mode is something that MS introduced to give people some chance to upgrade their applications, not for long term use. AFAIU.
If you want your application to be patible with IE9, then you will have to change it. If you are trying to maintain IE6-9 patibility then you have a real challenge, and you should consider whether this is really practical - in essence, you need at least 2 distinct sets of html. Is this practical for you?
IE9 patibility mode is different form IE9 and IE8 - it draws bits from both. So you need to do a full test agaisnt the patibility mode version, and ensure that it remains working against this.
So in answer to the question, the cons are that you are not being IE9 patible, and there is a danger that when IE10 es out, your code will not run against that in any mode. You are putting the effort into patibilty testing without providing for future changes. You would do better, in the longer term, to make your code IE9 patible. Also, the message you are giving your clients is that your code base is not going to be patible for much longer. Unless you are talking to them about a re-work, this is a real negative.
However, it sounds like your entire code needs a re-work, to forget about IE6 and be written for modern working browsers. Using patibility mode until that happens is probably OK. If you do this - and tell your clients - then staying in patibility mode is viable.
Using patibility mode will NOT cause the browser to use the JavaScript engine that was present in the old version of IE.
By that I mean it will run any JavaScript code using the IE9 engine. Which was a problem for us when debugging an old product that had a problem with IE7/8.