当前位置:Gxlcms > PHP教程 > 使用ajax防止页面缓存的代码

使用ajax防止页面缓存的代码

时间:2021-07-01 10:21:17 帮助过:3人阅读

asp网页

  1. <%
  2. response.expires=-1
  3. response.expiresabsolute=now()-1
  4. response.cachecontrol="no-cache"
  5. %>

php网页

  1. header("expires:mon,26jul199705:00:00gmt");
  2. header("cache-control:no-cache,must-revalidate");
  3. header("pragma:no-cache");
  4. ?>

jsp网页

  1. response.addHeader("pragma", "no-cache");
  2. response.addHeader("cache-control", "no-cache,must-revalidate");
  3. response.addHeader("expires", "0");

人气教程排行