In many cases, I make some small changes to a JavaScript file, to see the result I have to reload the whole page.
Changes made in chrome's developer tool in "Source" tab do not save in file system.
So, is it possible to reload single JavaScript file alone?
View and edit files, create Snippets, debug JavaScript, and set up Workspaces in the Sources panel of Chrome DevTools.
Just open the Chrome Dev Tools by pressing F12. Once the chrome dev tools are open, just right click on the refresh button and a menu will drop down. This menu gives you the option of doing a hard refresh, or even clearing the cache and do a hard refresh automatically.
I can't think of much efficient way to do this but one way you can do this is by adding a breakpoint at the start of the JavaScript file or at the block you want to add or delete changes to.
Then when you reload, the debugger will pause on that breakpoint, and you can make any changes you want to the source, save the file and then run the debugger through the modified code.
But here's a thing that you should know: next reload the changes will vanish but at least it let's you run some slightly modified JavaScript client side codes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With