请友人帮忙分析一下这段PHP代码哪里有误?
我已将http头设为禁止缓存,但是为啥我更新页面代码后,刷新页面时还是从缓存中取数据呢?header("Cache-Control:no-cache");header("...
我已将http头设为禁止缓存,但是为啥我更新页面代码后,刷新页面时还是从缓存中取数据呢?
header("Cache-Control:no-cache");
header("Expires:-1");
header("Pragma:no-cache");
请问我该怎样写http头才能实现不缓存呢? 展开
header("Cache-Control:no-cache");
header("Expires:-1");
header("Pragma:no-cache");
请问我该怎样写http头才能实现不缓存呢? 展开
4个回答
2013-09-17
展开全部
Header
description
Cache-Control: max-age
The max-age value defines the maximum age of the document—the maximum legal elapsed time (in seconds) from when a document is first generated to when it can no longer be considered fresh enough to serve
Expires
Specifies an absolute expiration date. If the expiration date is in the past, the document is no longer fresh.
description
Cache-Control: max-age
The max-age value defines the maximum age of the document—the maximum legal elapsed time (in seconds) from when a document is first generated to when it can no longer be considered fresh enough to serve
Expires
Specifies an absolute expiration date. If the expiration date is in the past, the document is no longer fresh.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把最后修改时间写成unix时间戳或者一个随机数,试试
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询