网页刷新

山林73 2002-04-10 12:31:40
怎样使网页每次都刷新,
也就是网页立即失效
...全文
35 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
8988 2002-04-10
  • 打赏
  • 举报
回复
<html>
<head>
<script>location=location.href</script>
</head>
....
....
孟子E章 2002-04-10
  • 打赏
  • 举报
回复
<meta http-equiv="expires" content="0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
redcaff_l 2002-04-10
  • 打赏
  • 举报
回复
to qiushuiwuhen(秋水无恨)
服务器怎么控制?
qiushuiwuhen 2002-04-10
  • 打赏
  • 举报
回复
详见:http://www.blueidea.com/bbs/newsdetail.asp?id=346635

HTTP:
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">


ASP
response.expires=0
response.addHeader("pragma","no-cache")
response.addHeader("Cache-Control","no-cache, must-revalidate")

PHP
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

P.S.客户端的经常失效,最好服务器控制
chenzengxi 2002-04-10
  • 打赏
  • 举报
回复
让浏览器认为这是上个世纪的网页,哈哈.

<meta http-equiv="Expires" CONTENT="Mon, 01 Jan 1990 00:00:01 GMT">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧