304:不满足使用HTTP条件标头指定的条件 [英] 304: The condition specified using HTTP conditional header(s) is not met

查看:113
本文介绍了304:不满足使用HTTP条件标头指定的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在将文件存储在Azure Blob存储中,当我请求文件时,我在firebug中收到一条消息304不满足使用HTTP条件标头指定的条件"

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"

我查看了 Azure Blob:不满足使用HTTP条件标头指定的条件" 及其类似的问题,但我没有使用blob.openread等读取内容...我只是在尝试在浏览器中查看内容.

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.

如果我在firefox中进行控件刷新(ctrl和f5),则会收到200的响应-因此可以正确使用它.我已经在要返回的文件上设置了缓存控件(最大年龄= 3600,公共),但仍然收到此错误/通知.

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

谢谢 史蒂夫

推荐答案

如果自您的浏览器上次访问内容以来,Blob存储中的内容没有更改,则这是正确的行为.

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

HTTP状态代码304被定义为未修改"(请参见 http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html ).我可以预料的是,您的浏览器已将上次接收到的ETag与内容一起发送到HTTP If-None-Match标头中的Blob存储,并且由于该ETag仍与与存储中的内容相关联的ETag匹配,因此无需通过电线发送新版本.

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.

此处提供有关ETag的更多信息: http://en.wikipedia.org/wiki/HTTP_ETag .您可以通过Fiddler看到这种行为.

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

FireFox Ctrl-F5显式强制刷新,这意味着不发送If-None-Match标头.因此,Blob存储通过网络发送图像的新副本.

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.

这篇关于304:不满足使用HTTP条件标头指定的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆