質問

I'm currently storing files within Azure Blob Storage and when I request the files I get an message in firebug of 304 “The condition specified using HTTP conditional header(s) is not met”

I've looked at Azure Blob: "The condition specified using HTTP conditional header(s) is not met" and its a similar question but I'm not reading the content in using blob.openread etc... I'm just trying to view the content in a browser.

If I do a control refresh (ctrl and f5) in firefox I get a response of 200 - so its being served out correctly. I've set the cache control (max-age=3600, public) on the file I'm returning but yet I still get this error / notification.

My question is, should I be worried that when I request the content that its coming back with this response?

Any advice / thoughts you have will be greatly received

Thanks Steve

役に立ちましたか?

解決

If the content in Blob Storage hasn't changed since your browser last accessed the content then this is the correct behaviour.

HTTP status code 304 is defined as "Not Modified" (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html). What I would anticipate is that your browser has sent the ETag which it last received with the content to Blob Storage in the HTTP If-None-Match header, and as this ETag still matches the ETag associated with the content in storage there's no need to send a new version down the wire.

More on ETags here: http://en.wikipedia.org/wiki/HTTP_ETag. You can see this behaviour in action through Fiddler.

The FireFox Ctrl-F5 explicitly forces a refresh, which means that no If-None-Match header is sent. Blob Storage therefore sends a fresh copy of the image down the wire.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top