Recently, when I changed the page, I saw response in the page. setheader ("Pragma", "No-Cache"); this statement does not know what it is. After investigation, it is found that the browser cache is disabled. Now, HTML, ASP, in PHP and jsp4 languages, the method used to prohibit the browser from caching pages is extracted and shared with you:
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 ");
JSP:
Response. setheader ("Pragma", "No-Cache ");
Response. setheader ("cache-control", "No-Cache ");
Respon Se. setdateheader ("expires", 0 );
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.