I'm loading gzipped txt file after page load through ajax,
Here is my code,
$(window).load(function(){
$.ajax({
url : "http://example.com/something.txt.gz",
dataType : 'html',
cache: true,
success : function(data)
{
data=$.parseJSON(data);
something=data;
}
});
});
And Based on chrome,
Response Headers
Accept-Ranges:bytes
Access-Control-Allow-Methods:GET
Access-Control-Allow-Origin:*
Access-Control-Max-Age:604800
Content-Encoding:gzip
Content-Length:95595
Content-Type:text/plain
Date:Wed, 21 May 2014 11:32:02 GMT
ETag:"cf999971e6ffcaf92dc5b79a8ffe2570k90bo"
Expires:Wed, 21 May 2014 23:40:18 GMT
Last-Modified:Wed, 21 May 2014 03:40:19 GMT
Server:AmazonS3
Vary:Origin, Access-Control-Request-Headers, Access-Control-Request-Method
x-amz-id-2:FGvjLrghp01FsNxaCI348RsP1BA+b98yjYzkkzpgeJNcz9HIn36CSfWIynkl18tfqNZp
x-amz-request-id:75FD682D733FDA0Ef3D
Now my problem is, This is working fine in chrome, FF, Safari and also IE9+.
But in IE8 and less than that the gzipped ajax is not working, if I send the same file using PHP then it works only by ajax it's not working and unzipped version of ajax call is also working.
Anyone please help me to fix this issue.
Thanks in advance.