I unsuccessfully try to enable HTTP gzip compression in my Windows Azure supporting WCF Restful service, which returns JSON only from GET and POST requests.
I tried so many things that it would be difficult for me to list them all, and now I understand that I am working with conflicting information (regarding the old version of azure, etc.), so itโs best to start from scratch
I am working with Visual Studio 2008 using the February 2010 tools for Visual Studio.
So, according to the following link.
.. HTTP compression is now enabled. I used the advice on the next page (only for advice on URL compression).
http://blog.smarx.com/posts/iis-compression-in-windows-azure
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="true" />
.. but I do not get any compression. It doesnโt help that I donโt know what is the difference between urlCompression and httpCompression . I tried to find out, but to no avail!
Could the problem that Visual Studio tools have been released before the version of Azure that supports compression might be a problem? I read somewhere that with the latest tools you can choose which version of Azure OS you want to use when publishing ... but I donโt know if this is true, and if so, I canโt find where to choose it. Can I use the pre-HTTP version?
I also tried the compression module compression http, but no results.
Does anyone have any modern tips on how to achieve this? That is, recommendations related to the current version of Azure OS.
Hurrah!
Stephen
Update: I edited the above code to fix the type in the web.config fragment.
Update 2: Testing the responses using the whatsmyip URL shown in the answer below shows that my JSON responses from my service.svc are returned without any compression, but static ARE HTML pages are being returned with gzip compression. Any advice on how to get JSON responses for compression would be greatly appreciated!
Update 3: I tried a JSON response larger than 256 KB in order to find out if there was a problem due to the JSON response being smaller than the comments below. Unfortunately, the answer is still not compressed.