How to force Chrome's script debugger to reload javascript?
I really like the ability to edit javascript in the chrome debugger however, I find that it can be really problematic getting the debugger to re-fetch the JavaScript from the server.
Sometimes I have to go as far just closing the debugger and reloading the frame works OK - but other times (an dI cannot pin down under what conditions this occurs) I have to clear my temporary internet cache. Sometimes I swear I have to close chrome completely, then clear the cache and then load the page before the debugger finally shows me the most up-to-date script.
(NB. There is no caching of the script by the web server)
I was wondering if anyone knew of a quick and easy way to tell the debugger to invalidate all its javascript and fetch it all anew on page reload?
While you are developing your script, try disabling the Chrome cache.
When you reload the page, the JavaScript should now get refreshed.
Chrome circa 2011
Chrome circa 2018
That's the best way I'm living on...Take care the inspector window must be kept opened in order to see this context menu while holding on the refresh button BTW: I usually use Empty cache and hard reload
It has another Advantage, It keeps all other websites stuff saved, just reloading and clearing this one only.
You can always clear a specific file by doing the following:
If not:
CTRL+F5
(mac: Command-Shift-R
) This is very handy if you have resources that are in frames and CTRL+F5
is not force refreshing them.
上一篇: 如何使用chrome的网络调试器重定向