htmlvisual-studio-codeliveserver

How can I prevent page reloads upon saving changes with the Live Server extension for VS Code?


I'm editing a website using Visual Studio Code with Live Server Plugin.

My HTML contains videos and many lines of text. (education related) If I edit a line in the middle of the code and save it, it will reload the website. And I have to go through the videos and other things at the start so then I can get back to the part that I edited. Can anybody help me prevent the plugin from reloading the web?

I tried with loading the website from ISS (Internet Management Services) and I can edit the file and the web won't be reloaded.


Solution

  • Courtesy of this GitHub issue ticket, put "liveServer.settings.ignoreFiles":["**"] in your settings.json file (either the user or workspace one- up to you). You may need to stop and restart the live server if it was already running while you changed the settings.