http-equiv="X-UA-Compatible" and IE - 9 compatibility view - site crashes

287 views Asked by At

I added this tag:

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

in to my header.

In IE 9 my browser crashes if I add the domain of my site in to the compatibility view list of the browser and then I call my website.

Also the browser crashes if I work on IE 11 and I am going to browsermode 9.

I have to add this meta tag. What can I do? Where do I wrong?

additional:

I found out that this meta tag doesn`t work well in combination with this part of script:

window.CSSHover = (function(){

    var REG_INTERACTIVE = /(^|\s)((([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover))/i,
        REG_AFFECTED = /(.*li?|.*ul?)\:(hover)/i,
        REG_PSEUDO = /[^:]+:([a-z-]+).*/i,
        REG_SELECT = /(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi,
        REG_CLASS = /\.([a-z0-9_-]*on(hover))/i,
        REG_MSIE = /msie (5|6|7|8|9)/i,
        REG_COMPAT = /backcompat/i;

    var CSSHOVER_PREFIX = 'csh-';

    var CSSHover = {
        elements: [], 

I am calling this script in the body with: [%- IF BROWSER=="MSIE" AND BROWSERVERSION < "9.0" -%]style="behavior: url(/css/csshover.h);" [%- END -%]

    callbacks: {}, 
    init:function() {
        if(!REG_MSIE.test(navigator.userAgent) && !REG_COMPAT.test(window.document.compatMode)) return;

        var sheets = window.document.styleSheets, l = sheets.length;
        for(var i=0; i<l; i++) {
            this.parseStylesheet(sheets[i]);
        }
    },
0

There are 0 answers