Live server refreshing every second without changes in code file - visual-studio-code

When I'm using Live Server extension in VS Code, my browser is refreshing every second, even though I do not make nor save any changes in my code file.
Why is that happening and how to solve this problem?
Can anybody help me? :)

I had the same problem. The issue was my (unrelated) script was running in background and writing to a file in the same directory. Live server detected these changes and sent the "reload" request to the browser.

I had this issue recently as well, and I spoke with a couple of people while testing various browsers.
We figured out that the issue was there was too much loaded into VSCode and it was looking through every single project/written code.
I closed VSCode down and then opened my repo for the particular project in terminal. I then used code . which opens VSCode, it opened only that specific repo/folders and then tried using Live server which worked perfectly with no refreshes happening.

Related

In VS code need to perform open with live server every time to see changes done in code on web browser

I have installed extension called live server in vs code, So that Till yesterday I could open my HTML file on browser directly from VS code through open with live server option , and if I performed any changes to code browser get automatically reloaded with new changes.
But now I need to always select open with live server option to see effects of updated code in my browser. Browser not automatically reloaded, manually reloading also doesn't have any effect.
Any buddy know solution please help me.
Watch this video it explains clearly https://youtu.be/wMmu_369n7c, Other wise install extension called SaveTyping by Michel Betancourt.

Pop-up message showing " Did you attach the CPU-Profile?" while trying to run live server in VScode

I have Live-Server extension installed in my VSCode.
I was trying to run the live-server but a pop-up appeared as below:
This is a reminder to make sure that you have not forgotten to attach 'c\Users\HP\AppData\Local\Temp\ritwickdey.LiveServer-unresponsive.cpuprofile.txt' to an existing performance issue.
I couldn't find much recourses to understand what the issue was or what action I should take about it.
BTW: Live Server is not loading the browser-page by its own, but at port:5500 its running.
Please Help.
after researching i found this blog, where i got to know that its because of performance issue
https://www.nicoespeon.com/en/2019/11/fix-vscode-extension-performance-issue/
first thing bundle your vsCode extensions:https://code.visualstudio.com/api/working-with-extensions/bundling-extension
if that solves the issue then great if not then add this extension to vsCode
https://marketplace.visualstudio.com/items?itemName=nicoespeon.abracadabra
hope the first link will provide complete solution.
Happy Learning

Prevent VsCode live server to scrolling up

I'm having an annoying issue with vscode live server. Every single time I hit ctrl+save or even when the files autosaves itself, vscode scroll the page up to the top of it. Sometimes when the page it's big, it just scrolls up to some random point on the page. It happens with every single page I code on Vscode using live server extension.
I tried to reinstall vscode and live server extension. I also found out that some people fixed this ticking "Settings:Full Reload" box. But also didn't work for me.
I just want that when I save the file the browser keeps the same position on the screen. I think code withou a live server feature is really wierd, but this issue is driving me crazy!!!
For me it works "Settings:Full Reload" but remember you have to close server before do that change

Changes in Umbraco CMS does not update at front-end instantly

I have an issue in updating contents in Umbraco. Whenever I update something in Umbraco, I have to wait at least one hour, sometimes 12 hours to see the changes at front-end.
The only way to see the changes immediately at front-end is "empty the connection string value umbracoDbDSN and refresh the page, then put the connection string back and refresh the page". I have to do everything I update something in CMS.
Do you guys have any idea what is happening here? Thanks.
The problem was. Umbraco was configured to run on load balanced servers on our old servers. I had to turn it off on the new server.
<distributedCall enable="false"> in umbracoSettings.config
What version are you running? When v5 first came out, I had a big problem with that (and solved it like you by touching the web.config to force a reset. Hopefully you are not using v5 (as its been discontinued and has extreme performance issues).
I have not had that problem in any v4.x versions that I can remember; changes should show up instantly after you republish.
Are you running in a standard configuration? Using a webfarm by anyt chance?
Is the ~/App_Data/umbraco.config file being written to on publish? This is the XML cache file that is used in displaying you website.
When you publish a node, the data is serialized into XML, stored in a database table and then written out to the umbraco.config cache.
This could be some kind of permissions issue, if umbraco doesn't have rights to read/write the file. Or you could have a corrupt dll that just isn't writing to it correctly. Or perhaps it's writing it out just fine, but your server is caching you pages in a weird way. Either way, I'd take a look first at the umbraco.config and make sure the data is being written to it on publish.

NetBeans: Code changes to javascript & css files are not reflected in browser after saving

This is driving me crazy. I'm developing an app in the NetBeans IDE in PHP, using the CodeIgnitor framework. I am making code changes to js and css files in NetBeans, saving them but the files the browser is loading do not contain the code changes. When I open the files directly outside of NetBeans, the saved changes aren't there.
I'm storing the javascript & css files in a folder called static, which is outside of the 'application' directory in CodeIgnitor. What's weird is any code changes in PHP files work fine. I'm guessing NetBeans is saving the changes to the js/css files somewhere else but can't find them on my hard drive. This just started happening, it was working 'normally' before.
Thanks for the help.
Al
I had the same problem, upon investigation, my browser cached my old style sheet that I had recently updated. Clearing the cache and refreshing showed my new styling, after around 20 minutes of frustration :D
This problem occurs due to browser cache. For chrome while testing open the developer mode by pressing the F12 key and set cache disabled in the network tab as shown in Image below. It will ensure that you will always get updated version of the page files.
Check to make sure that the files are where you think they are. I would imagine that CodeIgniter is rewriting the request to be inside your application folder and thus bypassing your specific folder.