I want to use GZIP compression on my website contents ... and I've place my code into PreRequestHandlerExecute
in global.asax.cs file.
It works on my local host (IIS , ASP.NET ) but when I upload it to remote host (which I haven't access to it's config. files) and when I look at fiddler results there is no compression at all. Here is an example of request and response:
Request Header:
GET **********/script/iscroll.js HTTP/1.1
Host: *****
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1
Accept: */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: ********************
Cookie: ASP.NET_SessionId=0w3uurg51f2mfdjhexzoegvq`
Respone Header:
HTTP/1.1 200 OK
Content-Type: application/x-javascript
Last-Modified: Thu, 20 Sep 2012 06:18:19 GMT
Accept-Ranges: bytes
ETag: "46857abaf796cd1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
X-Powered-By-Plesk: PleskWin
Date: Fri, 21 Sep 2012 20:46:00 GMT
Content-Length: 34777