Is it possible to force jQuery to make AJAX calls for URLs with gzip/deflate enabled?

后端 未结 1 1095
既然无缘
既然无缘 2020-12-03 04:59

I have a web service that is willing to output gzip/deflated data. I\'ve verified that the service will respond with raw JSON or with gzip\'d JSON using wget and curl.

相关标签:
1条回答
  • 2020-12-03 05:54

    Browsers automatically add the accept-encoding header as appropriate, including on XHR requests. You don't need to do that at the DOM/JS level.

    0 讨论(0)
提交回复
热议问题