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

Live Server not reloading to display new changes

Open BolajiAyodeji opened this issue 5 years ago • 67 comments

I'm submitting a...

[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Other: <!-- Please describe: -->

Current behavior

Live Server does not reload changes anymore, It only reloads and still show previous view, I would have to reload manually to get my new changes showing.

Expected behavior

Once I return to the browser, server ought to reload and show new changes

Environment

Browser:

- [x] Chrome (desktop) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: 5.2.0 <!-- Check which version is installed --> 
- Platform:  Windows <!-- Mac, Linux, Windows -->
- Visual Studio Code: 1.22.2 <!-- `code --version` -->

Others

BolajiAyodeji avatar Nov 21 '18 02:11 BolajiAyodeji

I am having the same issue. Chrome Canary: 72.0.3594.0 VS Code Insider: 1.30.0 Live Server: 5.2.0

shankarramr avatar Nov 21 '18 08:11 shankarramr

Can anyone send a screenshot of Vscode console? (help -> Toggle developer tools)

ritwickdey avatar Nov 21 '18 08:11 ritwickdey

@ritwickdey would do that now!

BolajiAyodeji avatar Nov 21 '18 08:11 BolajiAyodeji

I just updated VsCode to the Latest version and it seems to be working fine. Although it works for a while and stops, then I have to refresh again. The auto reloading is not consistent. I'm sending the screenshot of VsCode console now.

BolajiAyodeji avatar Nov 21 '18 08:11 BolajiAyodeji

y

yy

BolajiAyodeji avatar Nov 21 '18 08:11 BolajiAyodeji

@ritwickdey

BolajiAyodeji avatar Nov 21 '18 08:11 BolajiAyodeji

On every change you should see, "Change detected" ?

Let me know if you're getting Change detected but browser is not refreshing!! @BolajiAyodeji

ritwickdey avatar Nov 21 '18 08:11 ritwickdey

I just checked in my laptop. It's working fine.

ritwickdey avatar Nov 21 '18 08:11 ritwickdey

Change not detected browser loading. Its working fine here now on Latest VsCode update, but its not consistent, works fine for a while and stops reloading changes. On older version it doesn't work at all @ritwickdey

BolajiAyodeji avatar Nov 21 '18 09:11 BolajiAyodeji

but its not consistent, works fine for a while and stops reloading changes.

When it stop to work, can take a screenshot of browser console and Vscode console?

ritwickdey avatar Nov 21 '18 09:11 ritwickdey

but its not consistent, works fine for a while and stops reloading changes.

When it stop to work, can take a screenshot of browser console and Vscode console?

Alright! Right now, Its very slow in loading. Might take 3 seconds to load new changes.

Would take a shot once it stops working

BolajiAyodeji avatar Nov 21 '18 09:11 BolajiAyodeji

Same here on latest public VScode and Chrome (actually tried FF and IE too). Both console tabs show nothing.

image

talinas avatar Nov 30 '18 16:11 talinas

hi @talinas, You have not save the file. You've to save the file in order to live reload

ritwickdey avatar Nov 30 '18 16:11 ritwickdey

Hi @ritwickdey,

Thanks for a quick reply! I did save it, but probably over clicked something additionally while doing screenshot, therefore vscode shows '1 unsaved', anyway sending one more screen with all saved now, but page not refreshed:

image

talinas avatar Nov 30 '18 16:11 talinas

Can you please open VsCode console (Help => Toggle Developer Tools)

On every saves you should see, "Change detected" ....

please share a screenshot after 3-4 times of save .

ritwickdey avatar Nov 30 '18 16:11 ritwickdey

And Can you share a screenshot of View Source Page from browser?

ritwickdey avatar Nov 30 '18 16:11 ritwickdey

I do see "change detected" events: image

image

talinas avatar Nov 30 '18 17:11 talinas

Oh. I got the issue. Valid JS tag is <script src="..."></script> not <script src="..." />

https://www.w3schools.com/tags/att_script_src.asp

ritwickdey avatar Nov 30 '18 17:11 ritwickdey

Whoops! That solved it, refresh now works well.

Thanks @ritwickdey !

talinas avatar Nov 30 '18 17:11 talinas

hi @talinas, You have not save the file. You've to save the file in order to live reload

Indeed, it would be great if this could be reworked to refresh 'live', just as Brackets does it. #228 & #190. The extension is called 'live' server, after all 😁

dalDevelo avatar Nov 30 '18 17:11 dalDevelo

Sorry, guys, but it doesnt actually see my changes at all. Here is my vscode console: image No "changes detected" after any possible changes in css/html (saved file via different possible ways: interface, ctrl+S (if it has any meaning))

WadeShadow avatar Mar 22 '19 21:03 WadeShadow

Live Server Not Reloading the web page.

My Config. ref1 ref2 ref3

"Changes Detected but no live reloading" I am using the latest version of VSCode.

Please Fix this issue ASAP.

Chandu4221 avatar Mar 27 '19 06:03 Chandu4221

Update visual studio code, bottom left click on settings and "check for updates". Make sure you saved changes. Make sure you have no other programs running on the same port as vsc. Make sure you have body or head tag. Live Reload is not possible without body or head tag.

Djo44 avatar Jul 13 '19 15:07 Djo44

So i have disabled AutoSave option and then refresh the html page. After that its working fine.

A86S avatar Aug 22 '19 09:08 A86S

It seems to do the actual refreshing on its own if the Autosave option is enabled, rather than me having to save manually each and every time I want my changes to appear in the browser.

SphoorthyN avatar Sep 11 '19 12:09 SphoorthyN

On every change you should see, "Change detected" ?

Let me know if you're getting Change detected but browser is not refreshing!! @BolajiAyodeji

i have same problem :/ can you help please?

n1kalai avatar Oct 26 '19 19:10 n1kalai

Please am having the same problem of browser not reloading or refreshing after save. Here is the vs console log I got. consol

Please, I really need to resolve this. #ritwickdey

binuxo avatar Dec 05 '19 14:12 binuxo

try to delete node_modules and install then.. npm i or yarn install

чт, 5 дек. 2019 г. в 18:11, binuxo [email protected]:

Please am having the same problem of browser not reloading or refreshing after save. Here is the vs console log I got. [image: consol] https://user-images.githubusercontent.com/48191417/70242489-366bd000-1771-11ea-90d0-8d3a11ebc2be.png

Please, I really need to resolve this. #ritwickdey

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ritwickdey/vscode-live-server/issues/236?email_source=notifications&email_token=ALMTU2V33FBAS3RIW2GPVIDQXEDZ5A5CNFSM4GFRGG72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGA2O5Y#issuecomment-562145143, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMTU2UA2ASRN5JMWVS7EXLQXEDZ5ANCNFSM4GFRGG7Q .

n1kalai avatar Dec 09 '19 09:12 n1kalai

Live Server não atualiza após salvar arquivo html via vscode

Versões:

  • Live Server v5.6.1
  • VSCode v1.42.1

Tentativas de reparo:

  • Desativado "onSave" para "off"

  • Reinstalado Live Server

  • Restart no VSCode

  • salvamento automático: afterDelay

  • AutoSaveDelay: 1

  • LiveServer Wait: 1

  • Removido a pasta: .vscode/ritwickdey.liveserver-5.6.1

Alguém tem uma solução por favor?

wilsonrg avatar Mar 13 '20 02:03 wilsonrg

Meu Live Server voltou a funcionar após instalar outro plugin chamado Live Server Preview Instalei, reiniciei o VSCode e testei o Live Server que funcionou corretamente. Espero que outras pessoas possam ser ajudadas com esta solução estranha assim como eu fui.

wilsonrg avatar Mar 29 '20 23:03 wilsonrg