php跳轉清空頁面快取 php如何清除頁面快取?

2021-10-22 21:26:00 字數 659 閱讀 8470

清除頁面的方法:使用「header("last-modified:".gmdate("d,d m y h:i:s" )."gmt");header("cache-control:no-cache,must-revalidate");」即可。

在開發過程中我們常常會遇到頁面快取的問題(特別是html的快取);重新整理後還是舊版的數,再重新整理下還是舊版資料,慢慢的開始懷疑人生了,哈哈;所以在開發過程中我們又必要每次及時清除快取。

加入幾行**就可搞定這個問題,控制瀏覽器快取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");

方法2:header("cache-control: no-cache, must-revalidate");

header("expires: mon, 26 jul 1997 05:00:00 gmt");

PHP頁面跳轉

if isset url url echo cho meta http equiv refresh content 秒數 url 跳轉的檔案或位址 其中 xx是秒數,0為立即跳轉.refresh 是重新整理的意思.url 是要跳轉到的頁面.url echo 其中 更改 self 就可以實現跳轉限制原...

PHP頁面跳轉

header 函式的主要功能是將http協議標頭 header 輸出到瀏覽器。語法header string,replace,http response code string 必需。規定要傳送的報頭字串。replace 可選。指示該報頭是否替換之前的報頭,或新增第二個報頭。預設是 true 替換 ...

php頁面跳轉

php中如何跳轉,我們看下面的 form3.php html head head title title script type text css script form action formprocess3.php method post body table tr td name td td ...