將以下兩句寫在php文件的開始處即可:
header('Cache-Control:no-cache,must-revalidate,no-store');
header('Pragma:no-cache');
注:在有些文章中的做法是不添加no-store,我測試多個瀏覽器仍然緩存,後來加上no-store標籤後 就不緩存了
將以下兩句寫在php文件的開始處即可:
header('Cache-Control:no-cache,must-revalidate,no-store');
header('Pragma:no-cache');
注:在有些文章中的做法是不添加no-store,我測試多個瀏覽器仍然緩存,後來加上no-store標籤後 就不緩存了