0
我正在使用此代码在php中禁用缓存,但此代码在任何浏览器上都不起作用。请有人帮助我,我不希望保存的PHP网页在高速缓存存储器如何在php中禁用缓存
header('cache-control: no-cache,no-store,must-revalidate');
header('pragma: no-cache');
header('expires: 0');
我正在使用此代码在php中禁用缓存,但此代码在任何浏览器上都不起作用。请有人帮助我,我不希望保存的PHP网页在高速缓存存储器如何在php中禁用缓存
header('cache-control: no-cache,no-store,must-revalidate');
header('pragma: no-cache');
header('expires: 0');
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT"); // Read (1)
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
请参阅[如何禁用缓存](http://stackoverflow.com/questions/404617/disabling-the-browser-cache-in-php-or-using-javascript) – ponciste