vscode-live-server icon indicating copy to clipboard operation
vscode-live-server copied to clipboard

How to disable live reload

Open Er-rchydy opened this issue 5 years ago • 12 comments

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": *,

Er-rchydy avatar Jan 01 '19 19:01 Er-rchydy

I'm trying to do the same!

artworkjpm avatar Jan 25 '19 14:01 artworkjpm

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.

looeee avatar Aug 22 '19 12:08 looeee

@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.

Far-Se avatar Aug 24 '19 05:08 Far-Se

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

chenghuayang avatar Aug 05 '21 03:08 chenghuayang

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.

DavidFerH avatar Aug 21 '21 11:08 DavidFerH

"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.

chenghuayang avatar Aug 24 '21 14:08 chenghuayang

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

Why not to use,

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

alexanderhipe avatar Sep 13 '21 04:09 alexanderhipe

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

MustafaHossaini avatar May 20 '22 23:05 MustafaHossaini

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

a1xxx avatar Jun 16 '22 19:06 a1xxx

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.

garretwilson avatar Sep 24 '22 13:09 garretwilson

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

happy-bits avatar Nov 16 '22 09:11 happy-bits