The Cache-Control of the Http request header and response header is wordpress, and the Cache-Control in the request header is no-cache, in the response header, I set max-age = 259200 in nginx, so the browser does not cache it...
Request Headersview sourceAccept:*/*Accept-Encoding:gzip, deflate, sdchAccept-Language:zh-CN,zh;q=0.8Cache-Control:no-cacheConnection:keep-aliveCookie:CNZZDATA1254790698=1245005062-1429681029-%7C1429681029Host:yuanzi.mePragma:no-cacheReferer:http://yuanzi.me/User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36Response Headersview sourceAccept-Ranges:bytesCache-Control:max-age=259200Connection:keep-aliveContent-Length:100922Content-Type:application/javascriptDate:Wed, 22 Apr 2015 06:13:34 GMTETag:"55371597-18a3a"Expires:Sat, 25 Apr 2015 06:13:34 GMTLast-Modified:Wed, 22 Apr 2015 03:29:27 GMTServer:nginx/1.6.2
Reply to discussion (solution)
The Cache-Control in the request header is no-cache, and the browser notifies the server that data is not cached locally.
Cache-Control: max-age = 259200 in the response header is to notify the browser: do not bother me within 259200 seconds, refresh from the buffer
The Cache-Control in the request header is no-cache, and the browser notifies the server that data is not cached locally.
Cache-Control: max-age = 259200 in the response header is to notify the browser: do not bother me within 259200 seconds, refresh from the buffer
Moderator Xu ~
Still wondering, since there is no cached data locally, how can we refresh from the buffer ??
I set expires 3d in nginx. Is there any cache in the browser ??
I thought I set expires 3d, and the cache-control in the request header should also be 259200 ..
If the response header contains Cache-Control = no-cache, the browser will not Cache the response.
However, your response header does not exist, so it should be cached.
However, even if there is a cache, it is not necessarily used by the browser. Because the browser has other settings
At the same time, not all cache-related headers will be accepted by the browser. the protocol is only recommended and not necessarily executed.
If the response header contains Cache-Control = no-cache, the browser will not Cache the response.
However, your response header does not exist, so it should be cached.
However, even if there is a cache, it is not necessarily used by the browser. Because the browser has other settings
At the same time, not all cache-related headers will be accepted by the browser. the protocol is only recommended and not necessarily executed.
Thank you, moderator Xu ~