Azure CDN - Enabling HTTP 304 Caching Using ETag - Hosted Web Role

We are trying to enable HTTP (gzip) and HTTP 304 Caching compression through ETags on an Azure CDN. We already found a problem with enabling Azure CDN compression , but now we can’t get the compression and caching of ETag ( 304s ) working at the same time. This issue has been posted on the Azure forums here .

Here is an example of a compressed but not HTTP cached (304) link:

https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA&group=core.js

The following is an example of a reference to cached (304) but not compressible (gzip):

https://xxxx.vo.msecnd.net/resourceManager.axd?token=HL80vX5hf3lIAAA&group=core.png

Does anyone know how to work with HTTP caching (304s) and HTTP compression with Azure CDN?

+7
source share
1 answer

It is important to know if you are setting If-None-Match or If-Match ? Based on my experience, most users rely on the modification date and GET If-Modified-Since .

ETag is stronger if you need a cache flag for a given object with several encodings, etc.

For your requirement, use Modified / If-Modified-C , and you don't need encoding-based variable caching, and this should work.

Additional Information: HttpWebResponse LastModified

+3
source

All Articles