ritwickdey / live-server-web-extension

It makes your existing server live. This is a browser extension that helps you to live reload feature for dynamic content (PHP, Node.js, ASP.NET -- Whatever, it doesn't matter)
https://chrome.google.com/webstore/detail/live-server-web-extension/fiegdmejfepffgpnejdinekhfieaogmj/
MIT License
800 stars 327 forks source link

AJAX calls reloads the page #17

Open roiji opened 6 years ago

roiji commented 6 years ago

I have a dashboard that has a few components that uses AJAX to post to a (same-domain) URL. It is working just fine. But when I use the Live Server Web Extension, the page reloads/refreshes after every ajax query that I make (press Submit button or initialize ajax submit on change state).

Chrome: v67 Chrome Live Server Web Extension: v1.3.0 jQuery: v1.12.2 jQuery Validation Plugin: v1.14.0 jQuery UI: v1.11.4 jQuery Ajax Form Plugin: v3.51.0-2014.06.20 VS Code Live Server: 5.1.1

$('#message_form').ajaxForm({ dataType: 'json', success: processJson });

and

$.ajax({ type: "POST", url: "http://localhost/search/submit", data: $('#filter_submit').serialize(), async: true, success: function( data ) { ... } });

ritwickdey commented 6 years ago

Live Server web extension will reload your page if Live Server for VScode is ON & you made any changes in your code & hit save.