Today I encountered a method during development, that is, the customer requested that the page not be cached. After checking, I found the following ways to prevent the page from being cached
html
Just add it to the head.
asp tutorial method
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "No-Cache"
php tutorial method
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s' ) . 'GMT');
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
?>
There is also a simpler method, which is what everyone uses for ajax?mt=any data