阻止ajax缓存方法

时间:2023-03-09 08:28:16
阻止ajax缓存方法

通过添加meta标签

<meta http-equiv= "pragma" content= "no-cache"/> (pragma: 杂注)

<meta http-equiv= "Cache-Control" content= "no-cache, must-revalidate"/> (不缓存,必须重新开始)

<meta http-equiv= "expires" content= "Thu, 01 Jan 1970 00:00:01 GMT"/> (过期时间设为以前)

<meta http-equiv= "expires" content= "0"/> (立刻过期)