Quirks mode refers to a technique used by some web browsers for the sake of maintaining backward compatibility with web pages designed for older browsers, instead of strictly complying with W3C and IETF standards in standards mode. Here’s how to force IE into submission by adding a DLL.

The problem

Sometimes the browser decides to go into quirks mode. The X-UA-Compatible header can be used to instruct IE to load a specific version. But what if the user is debugging and asks for IE9? The browser changes it query string, but will be forced back if we just add the IE=edge. That’s why I created a module that inspects the Trident token and adds the right header.

The code

So let’s take a look at the code:

Compile it into a DLL and add the following to the web.config:


You can download the DLL from GitHub.

That’s it. Hope it helps.