ritwickdey / vscode-live-server

Launch a development local Server with live reload feature for static & dynamic pages.
https://ritwickdey.github.io/vscode-live-server
MIT License
5.68k stars 1.24k forks source link

How to disable live reload #256

Open Er-rchydy opened 5 years ago

Er-rchydy commented 5 years ago

I want to disable live reload but it's not working. i tried this configurations one by one, none of them worked :

 "liveServer.settings.ignoreFiles": ["**/*.*"],
 "liveServer.settings.ignoreFiles": ["*"],
 "liveServer.settings.ignoreFiles": "*",
 "liveServer.settings.ignoreFiles": *,
artworkjpm commented 5 years ago

I'm trying to do the same!

looeee commented 5 years ago

Same... the server is very handy, but it reloads the page about 5 times for every file change which is killing my eyes. I need to disable reloading.

Far-Se commented 5 years ago

@looeee @artworkjpm @Er-rchydy

  1. Close the server.
  2. Add this in settings.json "liveServer.settings.ignoreFiles":["**"],
  3. Open server.

Your code was good, but do not forget to close and open so changes take place.

chenghuayang commented 3 years ago

"liveServer.settings.ignoreFiles":["**"], doesn't work still. The page keep automatically reloading. Any idea?

DavidFerH commented 3 years ago

If you are using JavaScript, yo have to use the function event.preventDefault for stop submiting a form. imagen If you don´t use it, the browser will be refreshing every few seconds and reset all your front end.

chenghuayang commented 3 years ago

"liveServer.settings.ignoreFiles":["**"], doesn't work still. The page keep automatically reloading. Any idea?

I found that I've set a meta of http-equiv to refresh periodically. Not related to Live Server.

alexanderhipe commented 3 years ago

"liveServer.settings.ignoreFiles":["**"], doesn't work still. The page keep automatically reloading. Any idea?

Why not to use,

".vscode/", "/*.scss", "*/.sass", "*/.ts"???

MustafaHossaini commented 2 years ago

Live server injects js code to my beautiful html even after i add liveServer.settings.ignoreFiles":["**"] to my .vscode/settings.json file.

What da helllll

a1xxx commented 2 years ago

In settings.json: "files.autoSave": "off", this way when you manually save it reloads.

garretwilson commented 1 year ago

There needs to be a quick way or at least a simpler way to to turn this off. If we're dealing with a web page that loads a huge amount of data, we don't want it reloading every time we make a change. We still want to be able to hit F5 in the browser to test, but at a time when we choose, not just when we save our edits. And we shouldn't be forced to postpone saving edits just to keep the browser from reloading.

Auto-reloading is an awesome feature, but it needs to have a toggle or at least an easy-to-access setting.

happy-bits commented 1 year ago

I had the same problem, but it worked after changing settings.json

{ "liveServer.settings.ignoreFiles": [ "**/**", ] }

AND restarting the server (click on Port:5500, then click on the same button again to start)

port

starball5 commented 1 year ago

Janitorial note: Related on Stack Overflow: How can I prevent page reloads upon saving changes with the Live Server extension for VS Code?.