Friday, January 10, 2014

Problem with Intranet Web Site Content?

Did your Intranet web application users complain about your website not working at all? Here is one of the root cause: IE running in emulation mode of older browsers. It will mess up some JavaScript functions that relies on relative new features.


  • Your clients use IE
  • Only have problem when using Intranet like URLs
  • JavaScript console shows weried error messages like: 'JSON' is undefined
  • IE 11 Emulation (or IE10 document mode) is showing IE 7 or older or even quirk mode (however, if you see Edge then the solution I provide below won't help you)
  • DOM view showing your nice HTML5 doc type being commented out
IE commented out doctype

Root Cause

IE option "Display intranet sites in Compatibility View" forced it to emulate behavior of older browser for Intranet web applications, regardless what is in the web page's header.


This worked for me: change IIS HTTP header
  • In IIS admin, go to the folder or file that you want to enable IE "Edge" mode
  • Click "HTTP Response Headers"
  • Click "Add", and type Name: X-UA-Compatible, Value: IE=edge

HTTP Header that will fix the problem

No comments: