24 March, 2014

Force the Client’s browser document mode from server side setting

I really was puzzled as to why my local browser (dev. machine) rendered my website perfectly, whereas when deployed to a production server (and thus a different IIS, mind you) it failed to render basically anything.

It turns out that the IIS sends a HTTP Response Header that directs how the Client browser should interpret and render the document. Before you say “duh?”, this is the “document mode” introduced in IE in the later incarnations. It is not sufficient to just enter a !DOC variable in the HTML of the document, you need also to set the x-UA-Compatible variable as well. This is easily done directly from IIS as seen below. When setting this on the website directly in IIS, it will be written to the site’s web.config file behind the scenes.

This header takes several values (IE 7..10), but the below will make it render in most modern browsers.


Information: http://technet.microsoft.com/en-us/library/dn321432.aspx

It actually turns out that you should be using this value: IE=Edge

Technorati Tags: ,

InRiver: Not loading your extensions?

(You really need to in the loop to appreciate the issue this post addresses). Man, I've been fighting this problem for hours before I ...