Home > Backend Development > PHP Tutorial > Code to prevent page caching using ajax

Code to prevent page caching using ajax

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:03:41
Original
1043 people have browsed it
  1. < ;metahttp-equiv="expires"content="wed,26feb199708:21:57gmt">
  2. or
Copy code

asp web page

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

php web page

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

jsp web page

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


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template