No auto-decompression of gzipped json on browser's side when using angular's http get method
- 阅读更多 关于 No auto-decompression of gzipped json on browser's side when using angular's http get method
问题 I'm trying to load a json file using angular (v1.2.6): $http.get('myfile.json').success(function(data) { ... } This works fine, except when I create a (static) compressed version of the file on the server, and try to load 'myfile.json.gz' instead (to reduce the loading time). The request headers seem correct (Chrome 31.0 on Mac) (as stated here and here): Accept: application/json, text/plain, */* Accept-Encoding: gzip,deflate,sdch while the response headers contain: Connection: close Accept