Cons of using Internet Explorer's Compatibility Mode

后端 未结 5 519
甜味超标
甜味超标 2021-01-17 19:02

What are cons of force a web site viewed in IE to compatible mode? Say we force IE9 to IE8 compatiblity mode?

  • Performance drawbacks
  • C
5条回答
  •  日久生厌
    2021-01-17 19:31

    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 compatible with IE9, then you will have to change it. If you are trying to maintain IE6-9 compatibility 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 compatibility mode is different form IE9 and IE8 - it draws bits from both. So you need to do a full test agaisnt the compatibility 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 compatible, and there is a danger that when IE10 comes out, your code will not run against that in any mode. You are putting the effort into compatibilty testing without providing for future changes. You would do better, in the longer term, to make your code IE9 compatible. Also, the message you are giving your clients is that your code base is not going to be compatible 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 compatibility mode until that happens is probably OK. If you do this - and tell your clients - then staying in compatibility mode is viable.

提交回复
热议问题