IE scrambles script in IIS7 with static compression turned on
Asked Answered
F

2

6

I am having issues with javascript files not decompressing in IIS7 and stylesheets not loading properly.

I can fix this issue by turning off Static compression in IIS but this can't be a permanent solution. The issue has suddenly started happening. We haven't changed the code.

The web application is an asp.net web forms app in .net 4. static and dynamic compression was set in IIS. another web forms web application is still running fine with static compression set at the application level.

the server was updated to .net 4.5 framework.

Some of the stylesheets tags are set to runat server as I append a version number to force a reload of the css when its cached and a new version is released.

This issue only happens in Internet Explorer.

I am really stuck on this issue.

The Request

Request GET        /webapp/JavaScript/jQuery/js/jquery-1.3.2.min.js HTTP/1.1
Accept  text/html, application/xhtml+xml, */*
Accept-Language x-en-GB-zscot
User-Agent  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
UA-CPU  AMD64
Accept-Encoding gzip, deflate
Host    localhost
Connection  Keep-Alive

Response Headers

Key Value
Response    HTTP/1.1 200 OK
Cache-Control   private
Content-Type    application/x-javascript
Content-Encoding    gzip,gzip
Last-Modified   Wed, 10 Oct 2012 15:45:44 GMT
Accept-Ranges   bytes
ETag    "04f24efea6cd1:0"
Vary    Accept-Encoding
Server  Microsoft-IIS/7.5
X-Compressed-By HttpCompress
Date    Tue, 04 Dec 2012 11:07:13 GMT
Content-Length  19788

Part of the Response Body

‹
@õ¿‹ä½kwÚȶ(úýü
¬ÕÛ-…âá¤×>g +ŒtÂÛI~a²®²M7F^€ã¤ýÛï|T•ª„p²ö8çŽ;ÆéÑ1R©Þ5k¾kVéÕÿȽÊýñé)šÏµÃ¯áéh>y\溓›yI_ŠoŠ¯1Ïýrùè—Jü³GñC  RñÃûøñû|rw¿Ì¹#/÷º\þG®ßÏrŸ£Åä3|x
Flatworm answered 4/12, 2012 at 11:15 Comment(0)
F
0

I have narrowed this issue down to the web site using Blowery HttpCompression.

It seems that with .net 4.5 Blowery and IIS no longer play together nicely and the static content seems to be compressed twice, once by Blowery and once by IIS.

The above is a guess but one think I do know is that be removing Blowery the website works fine again.

Flatworm answered 11/12, 2012 at 15:5 Comment(1)
I think that with my answer help you to focus on the compression issues, and you find that - correct ?Narcosis
N
2

This is qZip decompression fail. Can happen if the Content-Length on the header is not the correct one.

Some times if the page set the Content-Length on the header, and then the web server try to gZip the page, but fail to change the Content-Length - because have been all ready send to the browser.

Possible solutions is to remove the set of Content-Length from your code and let IIS set it, see if you all ready make qZip this files and decide - ether let iis do it for you, ether do it your self.

Similar problem and answer:
ASP.NET site sometimes freezing up and/or showing odd text at top of the page while loading, on load balanced servers

HTTP Compression: Some external scripts/CSS not decompressing properly some of the time

IIS content-type wrong for compressed CSS

Narcosis answered 8/12, 2012 at 6:12 Comment(3)
Some very nice info and leads, will test on monday. I missed all these questions you linked to when searching last week. damn.Flatworm
@Flatworm I must tell you that its also looks like wrong text encoding. Like you send them utf-8, but is read them like something else.Narcosis
@Flatworm I also miss your question before the bounty. Well probably is the content length.Narcosis
F
0

I have narrowed this issue down to the web site using Blowery HttpCompression.

It seems that with .net 4.5 Blowery and IIS no longer play together nicely and the static content seems to be compressed twice, once by Blowery and once by IIS.

The above is a guess but one think I do know is that be removing Blowery the website works fine again.

Flatworm answered 11/12, 2012 at 15:5 Comment(1)
I think that with my answer help you to focus on the compression issues, and you find that - correct ?Narcosis

© 2022 - 2024 — McMap. All rights reserved.