Note that there are some explanatory texts on larger screens.

plurals
  1. POCan a page opt out of IIS 7 compression?
    text
    copied!<p>My pages are automatically being compressed by IIS7 with GZIP. </p> <p>That is great... but, for one particular page, I need to stream it to the user, using <code>Response.Flush()</code> when needed. But when the output is being compressed, the IIS server seems to collect all my output until the page is done before compressing and sending it to the client. That nullifies my attempt to Flush the content out to the user.</p> <p>Is there a way that I can have this one page <strong>opt out</strong> of the compression?</p> <h2><em>One possible option</em></h2> <p>I've determined that if I manually set the content type to one that does not match the IIS configuration at <code>c:\windows\system32\inetsrv\config\applicationhost.config</code>, then IIS will not compress it. Eg. <code>Response.ContentType = "x-text/html"</code>. This works okay with IE8, as it falls back to display the HTML. But Firefox will ask the user what to do with the unknown file type.</p> <p>This could work, if there was another Mime Type I could use that browsers would accept as HTML, that is not matched in the <code>applicationhost.config</code>. For reference, these are the mime types that will be compressed:</p> <pre><code> &lt;add mimeType="text/*" enabled="true" /&gt; &lt;add mimeType="message/*" enabled="true" /&gt; &lt;add mimeType="application/x-javascript" enabled="true" /&gt; &lt;add mimeType="application/atom+xml" enabled="true" /&gt; &lt;add mimeType="application/xaml+xml" enabled="true" /&gt; </code></pre> <h2><em>Others options?</em></h2> <p>Are there other options to opt out of compression?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload