简体   繁体   中英

How to stop caching in web console when viewing code file

Trying to debug a PHP file which has a syntax error using Firefox web console. I have set the Disable Cache option and when I change the file it does take effect immediately. However, the console displays the syntax error and when I click on the link in the message it opens a tab with the code page and highlights a line, but the page displayed is before the last change. If I open a new tab and repeat the process I get the updated code.

I find this very confusing, is there any way to make it use the current code?

append this..

<?php

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");
?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM