IE 9 not accepting compressed AJAX data

649 views Asked by At

I have a node.js JSONP server that is returning data for a webpage. The page makes AJAX requests to Node server, and gets JSONP code back.

This is working perfectly in all browsers, until I enable compression. If I return the AJAX response in deflate or gzip compression it works for everyone except IE 9; which won't decode the file. IE just shows a blank body coming back, no error, no output on the console.

I have ensured the request goes through and that proper data is returned to the IE clients, IE just won't accept it. Here are the response headers that are getting sent to all clients:

 Access-Control-Allow-Origin:*
 Connection:keep-alive
 Content-Encoding:deflate
 Content-Length:31203
 Content-Type:application/javascript; charset=UTF-8
 X-Content-Type-Options:nosniff

I should add - these headers appear in other browsers, but IE does not show the "Content-Encoding: header. I think this might be normal, because I have noticed the same behaviour with websites that have compression enabled and work in IE. IBM.com for example - Chrome shows the content-encoding, IE does not.

So does IE not support compression and other servers are detecting it? Does anyone know why IE is rejecting this data?

Cheers,

whiteatom

1

There are 1 answers

0
Paul Sweatte On

Apache may be setup to sniff IE and use HTTP 1.0 instead of HTTP 1.1. If the site is using HTTPS, IIS won't allow compression. A related question may help as well.