相关疑难解决方法(0)

Chrome浏览器未向服务器发送if-modified-since标头

我将这些标头由服务器发送到客户端:

Cache-Control:private
Connection:keep-alive
Content-Encoding:gzip
Content-Type:text/html
Date:Sun, 27 Nov 2011 11:10:38 GMT
ETag:"12341234"
Set-Cookie:connect.sid=e1u...7o; path=/; expires=Sun, 27 Nov 2011 11:40:38 GMT; httpOnly
Transfer-Encoding:chunked
last-modified:Sat, 26 Nov 2011 21:42:45 GMT
Run Code Online (Sandbox Code Playgroud)

我希望客户端验证文件在服务器上没有更改,如果否则为"304",则发送"200".

Firefox发送:

if-modified-since: Sat, 26 Nov 2011 21:42:45 GMT
if-none-match: "12341234"
Run Code Online (Sandbox Code Playgroud)

为什么Chrome不会在刷新页面时发送相同内容?我正在追踪.Net运行的行为:

context.Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate)
Run Code Online (Sandbox Code Playgroud)

http cache-control http-headers node.js

40
推荐指数
3
解决办法
2万
查看次数

标签 统计

cache-control ×1

http ×1

http-headers ×1

node.js ×1