Vscode-live-server: AJAX HTTP Requests refreshing the page

Created on 28 Oct 2019  路  3Comments  路  Source: ritwickdey/vscode-live-server

I'm submitting a...

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

Current behaviour

When I'm using AJAX, and I send a PUT/POST/DELETE HTTP petition it automatically refreshes the page, It does not happen with GET petition.

Expected behaviour


In my humble opinion, I do think that the extension should only refresh the page if we save the document in VSCode, and not if we send any HTTP Header. I tried to send the same request without using the extension and it didn't refresh my page, so that is not a code problem.

I am sure you could fix it, much thanks for the extension is very helpful to many of us.

Keep the good work going!!
Thanks for your time.

Environment

Browser:

- [x] Chrome (desktop) Version 78.0.3904.70 (Official Build) (64-bit)
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:

- Live Server: 5.6.1
- Platform:  Linux
- Visual Studio Code: 1.39.2

Others

Most helpful comment

i got the same issue, and it does happen with with GET petition.

All 3 comments

i got the same confusion. why live server need refresh the page when it get ajax http request? it will clear response data.

i got the same issue, and it does happen with with GET petition.

I have a similar issue here as well. It happens anytime I update the database though with my Node.JS backend. Only then does it refresh the page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dominik-korsa picture dominik-korsa  路  6Comments

manavm1990 picture manavm1990  路  5Comments

GaoHengdong picture GaoHengdong  路  4Comments

julesmqz picture julesmqz  路  7Comments

maboumra picture maboumra  路  3Comments