Override intranet compatibility mode IE8

后端 未结 19 2452
执念已碎
执念已碎 2020-11-22 10:04

By default IE8 forces intranet websites into compatibility mode. I tried changing the meta header to IE8, but it doesn\'t acknowledge the meta header and just uses the brows

19条回答
  •  忘掉有多难
    2020-11-22 10:06

    It is possible to override the compatibility mode in intranet.

    For IIS, just add the below code to the web.config. Worked for me with IE9.

    
      
        
          
          
        
      
     
    

    Equivalent for Apache:

    Header set X-UA-Compatible: IE=Edge
    

    And for nginx:

    add_header "X-UA-Compatible" "IE=Edge";
    

    And for express.js:

    res.set('X-UA-Compatible', 'IE=Edge')
    

提交回复
热议问题