Ok, so I figured out the answer to my question... Apparently asking the question is all I needed to to do, to answer it myself. First of all, IE sucks in terms of it's determination to cache dynamic (*.axd) files, as a result I had simply had to clear IE's cache (and history) and add a simple check against the Request as depicted below.
void OnGlobalPostReleaseRequestState(object sender, EventArgs e)
{
if (Request.RawUrl.Contains("ScriptResource.axd", StringComparison.OrdinalIgnoreCase))
{
return;
}
string contentType = Response.ContentType;
// Compress only html, style-sheet, and javascript documents.
switch (contentType)
{
case "application/x-javascript":
case "text/javascript":
case "text/css":
case "text/html":
{
// Get the Accept-Encoding header value to know whether zipping is supported by the browser or not.
string acceptEncoding = Request.Headers["Accept-Encoding"];
if (string.IsNullOrEmpty(acceptEncoding)) return;
// If gzip is supported then gzip it else if deflate compression is supported then compress in that technique.
if (acceptEncoding.Contains("gzip"))
{
// Compress and set Content-Encoding header for the browser to indicate that the document is zipped.
Response.Filter = new GZipStream(Response.Filter, CompressionMode.Compress);
Response.AppendHeader("Content-Encoding", "gzip");
}
else if (acceptEncoding.Contains("deflate"))
{
// Compress and set Content-Encoding header for the browser to indicate that the document is zipped.
Response.Filter = new DeflateStream(Response.Filter, CompressionMode.Compress);
Response.AppendHeader("Content-Encoding", "deflate");
}
}
break;
}
}
As detailed here - ScriptResource.axd are automatically compressed, knowing this I can now filter out any and all requests that contain the scriptresource.axd as part of their Raw URL.
Using fiddler I was able to see that the (ScriptResource.axd) files were having two "Content-Encoding" of "gzip" in their headers, one that occurred automatically and one that I was appending.
Double compression == major headaches! :)