title: Cannot seem to get rid of Compatibility View?
body: <p>I am using the <a href="http://code.google.com/p/flot/">Flot</a> plotting library. It seems to work fine in IE8 and IE9 but the problem comes when in IE9 Compatibility View - it does not render any of the graphs. I suspect this is because of the HTML5 <code>canvas</code> object it uses heavily but I could be wrong. I tried doing the following:</p>
  
  <ul>
  <li><p>Add: <code>&lt;meta http-equiv="X-UA-Compatible" content="IE=Edge" /&gt;</code> to my HTML <code>&lt;head&gt;&lt;/head&gt;</code> tag. I even tried <code>IE=8</code> and <code>IE=9</code> and that did not help either. My tag look like this:</p>
  
  <blockquote>
  <pre><code>&lt;!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.1EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=8" /&gt;
      ...
  &lt;/head&gt;
  &lt;body&gt;
  ...
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  </blockquote></li>
  <li><p>Because I was still seeing the problem, I added the following to my Global.asax.cs file:</p>
  
  <pre><code>void Application_End(object sender, EventArgs e)
  {
      //  Code that runs on application shutdown
      Response.Headers.Add("X-UA-Compatible", "IE=Edge");
  }
  </code></pre></li>
  </ul>
  
  <p>I am still facing the problem. The error I get is this:</p>
  
  <pre><code>HTML1202: http://intranetdomain/SampleProj/Default.aspx is running in Compatibility View because 'Display intranet sites in Compatibility View' is checked. 
  Default.aspx
  HTML1113: Document mode restart from IE7 Standards to IE9 Standards 
  Default.aspx
  </code></pre>
  
  <p>Is there anyway to over ride this? </p>
  
  <p><strong>EDIT:</strong> Checking my response headers, adding that line in <code>Global.asax.cs</code> did not add them to my headers. I wonder why.</p>
  
  <p>Response Headers:</p>
  
  <pre><code>Key Value
  Response    HTTP/1.1 200 OK
  Cache-Control   private
  Content-Type    text/html; charset=utf-8
  Server  Microsoft-IIS/7.5
  X-AspNet-Version    4.0.30319
  X-Powered-By    ASP.NET
  Date    Thu, 27 Oct 2011 20:39:55 GMT
  Content-Length  29088
  </code></pre>
  
  <p>EDIT 2: Apparently, <code>Application_End</code> was the wrong event. Instead, doing this injected the element into the header:</p>
  
  <pre><code>void Application_BeginRequest(object sender, EventArgs e)
  {
      Response.Headers.Add("X-UA-Compatible", "IE=Edge");
  }
  </code></pre>
  
  <p>But the problem itself still persists.</p>