Static file is compressed but uncompressed version is returned
<p>I've checked many questions about this (gzip compression on IIS) but none of them answer my question. The server request trace clearly shows the following headers are being returned (through failed request tracing):</p>

<pre><code>Cache-Control: max-age=604800
Content-Type: text/css
Content-Encoding: gzip
Last-Modified: Fri, 20 May 2016 16:21:42 GMT
Accept-Ranges: bytes
ETag: "02fa9b1b3b2d11:0"
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
</code></pre>

<p>But the client receives the following:</p>

<pre><code>Accept-Ranges: bytes
Cache-Control: max-age=604800
Content-Type: text/css
Date: Mon, 23 May 2016 08:39:03 GMT
ETag: "02fa9b1b3b2d11:0"
Last-Modified: Fri, 20 May 2016 16:21:42 GMT
Server: Microsoft-IIS/7.5
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Powered-By: ASP.NET
</code></pre>

<p>And no matter how many times I request it, it'll always get that.</p>

<p>Now something interesting happens when I use the LivePage plugins (it keeps requesting resources to update them if there are changes). After a few requests by that plugin the responses are gzipped (it appends <code>?livepage=[timestamp]</code> to the url). I've already set the <code>frequentHitThreshold</code> to <code>1</code> and <code>frequentHitTimePeriod</code> to <code>00:10:10</code>. If I spam requests manually by postman, the server never returns zipped. Screenshot bellow is when livepage requests the resource </p>

<p><a href="https://i.stack.imgur.com/kErSr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kErSr.png" alt="enter image description here"></a> </p>

<p>I am seriously all out of ideas. Any help will be appreciated.</p>

<p><strong>EDIT</strong> I just noticed that <code>livePage</code> sends a <code>HEAD</code> request. And that type of request always returns the compressed resource but <code>GET</code> methods don't.</p>

<p><strong>EDIT 2</strong> If I remove <code>Accept-Language</code> and <code>User-Agent</code> from the <code>GET</code> request that will also work. Any IIS Gurus around to offer a an explanation for this behavior? </p>

<p><strong>EDIT 3</strong> Request headers that do not work (<code>GET</code>):</p>

<pre><code>Accept: text/css,*/*;q=0.1 */ &lt;- added the last asterisk slash to keep syntax highlightitng, it's not part of the header
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
Cache-Control: no-cache
Connection: keep-alive
Cookie: .ASPXAUTH=3FB30D0AE9CAFCD5CA54A9A73ED43EB7143B3AB5B35C3BEBC6623C2E6853977BE74BB11E688950BCC07DD2C99A1B3F77B63B2258C4A9E0B59A5C4DD67E88B9F96C419D5CB4EBE3620779FC7D8C07E174A94E4A5F4A6923A0DCF740B505F6B0740C13F8E0E19C6A9BA8C598157A527EA8; Orchrd-=%7B%22Exp-N42-Settings%22%3A%22open%22%7D; _ga=GA1.2.1237431644.1463664397
Host: mysite.local
Pragma: no-cache
Referer: http://mysite.local/
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
</code></pre>

<p>If same request headers are sent as <code>HEAD</code> request it'll work and return Compressed file (It'll also log it in Trace). Interesting part is if those request headers are sent <strong>without</strong> <code>User-Agent</code> and <code>Accept-Language</code>, It'll also work and return the compressed file (however it'll not be logged in trace)</p>