Today, when developing, I encountered a method where the customer requested that the page not be cached. After checking, I found the following methods to prevent the page from being cached: html Copy code The code is as follows:<HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="0"> </HEAD> asp tutorial practice Copy code The code is as follows:Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.Expires = 0 Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "No-Cache" PHP tutorial practice Copy code The code is as follows:<?php header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d MYH:i:s') . 'GMT'); header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); ?> There is also a simpler method, which is used by everyone when ajax? mt = random data |
>>: Design sharing of the download page of the Pengyou.com mobile client (picture and text)
A few months after entering the industry in 2005, ...
1. Install openssh-server yum install -y openssl ...
Usage of alter command in mysql to edit table str...
Table of contents First install wget View Help Ma...
Detailed explanation of MySQL instance with SSD s...
Table of contents topic analyze Basic solution Ba...
Sometimes we need to remotely run programs on the...
1. Triangle Border settings Code: width: 300px; h...
1. When ffmpeg pushes video files, the encoding f...
While working on a Linux server, assigning static...
Table of contents What is nodejs Install NodeJS H...
Table of contents 1. Preparation 2. Deployment Pr...
background PNG images take up more storage space ...
Table of contents 1. The role of nginx process lo...
Currently, layui officials have not provided the ...