How to enable gzip HTTP compression on Windows Azure dynamic content

前端 未结 6 775
不知归路
不知归路 2020-12-04 06:55

I\'ve been trying unsuccessfully to enable gzip HTTP compression on my Windows Azure hosted WCF Restful service which returns JSON only from GET and POST requests.

6条回答
  •  清歌不尽
    2020-12-04 07:42

    Yes, you can choose the OS you want, but by default, you'll get the latest.

    Compression is tricky. There are lots of things that can go wrong. Are you by chance doing this testing behind a proxy server? I believe IIS by default doesn't send compressed content to proxies. I found a handy tool to test whether compression is working when I was playing with this: http://www.whatsmyip.org/http_compression/.

    It looks like you have doDynamicCompression="false"... is that just a typo? You want that to be on if you're going to get compression on JSON you return from a web service.

提交回复
热议问题