I have tried uninstalling vs code and reinstalling it, same with the live server extension. I have also made sure chrome is the default browser but the code change is not reflecting even after Im reloading the page (in live server normally updates auto). The changes only happen if I close the window and open with live server again. Id appreciate a solution!
Related
I am running my company's application locally and making some HTML/TS changes. However, whenever I save/hot reload and reload the browser, nothing changes.
I can stop debugging, build/rebuild, and run and the changes remain the same.
On a hunch I deleted the entire file from the directory and ran the application and nothing changed.
What am I missing here?
Web.Config is all configured to our dev environment currently, main web application is configured locally.
It turns out the problem was with Chrome. Inside Dev Tools -> Settings -> Network -> Disable cache (while DevTools is open).
When I clicked this option, it stopped caching old changes, and I was able to see my updates again with each hot reload.
On Linux Debian 10 (Buster), I am using the http(s) client google-chrome-stable.
I was configuring (nginx) and testing (chrome) a reverse proxy and it got cached using a wrong domain.
I fixed the configuration but it still resolve to the wrong domain.
I have tried to go chrome://net-internals/#dns and click on Clear host cache but that didn't change anything.
I have tried to go chrome://net-internals/#sockets and click on Flush socket pools but that didn't change anything.
I am not working with FireFox, so FireFox can resolve correctly (so does curl).
After about 10 minutes, without restarting chrome. I did F5 (refresh) and it was loading the proper page. I haven't found a manual way to immediatly clear chrome cache.
I am doing devops and I haven't solved this issue for years.
Would love to know how to do one day :O
What happens if you open developer console F12 and then hold down on the refresh button and then select empty cache and hard reload?
Take a look at this gif for an example.
When I change a file in the directory, the change is not reflected on the web page shown when I access it through localhost, but it is shown when I access it directly by the file path on my system. Why?
I am on a Windows machine. My files are stored at C:\Program Files (x86)\Ampps\www\connor.dev . When I directly reference a file, by going to a link like this in the browser, file:///C:/Program%20Files%20(x86)/Ampps/www/connor.dev/index.php, the changes I made and saved in Sublime Text are shown. When I access it by going to localhost/connor.dev/, the changes are not shown. Even if I delete the file completely, it is still shown in localhost. This started happening recently on xampp, so I uninstalled it and used Ampps, and now the same thing is happening. If you need more info please ask.
Press Ctrl-F5 to hard refresh the page (to not use Browser's cache).
If you still see the previous pages or changes, then Apache has mod_cache caching them, or PHP has its opcode cache settings set to not refresh changes for X amount of time.
I'm using Bitnami and the way I fixed it was to go inside C:\Bitnami\wappstack-version-number\php\php.ini, you can make the following changes and then reset your server:
opcache.enable=0
opcache.revalidate_freq=0
My php was updating every 60 seconds before, so I decided to turn that to 0 and just disable caching.
Its happening because of apache mod_cache caching the resources.
For quick fix. Just restart the Apache server.
In ubuntu i use this below command in terminal to restart the Apache server
systemctl restart apache2
Now refresh the browser, then you will get the updated one.
It comes out to be an issue with the cache thing, so in simple words all you have to do is to remove the cached data of the specific webpage.
I am new to web design, and I am using XAMPP for my website to test PHP and MySQL, I noticed that when I modify the index.html (HTML, CSS), I don't see the changes immediately when I open it from the browser localhost/webdesign/index.html. I often have to wait for more than 10 minutes to see the changes in localhost.
However, if I open it locally D:/xampp/htdocs/webdesign/index.html I can see the modification I made immediately.
I restarted the Apache server from the XAMPP control panel and still don't see the changes that I made. Anyone know how to fix this?
When I changes the picture files, I can see the modification I made in the source code in localhost/index.html, but the pictures are still the same, the files are not being updated.
What can I do to speed things up?
I'm developing an application that makes use of the struts2 framework, java and webcontent. I use Eclipse as my IDE and tomcat 7.0 as a server. Everything works fine, but when I make changes to the struts.xml file those changes aren't always reflected in my browser.
Here's my workflow:
1) Develop/make changes
2) save all
3) start tomcat 7.0 server
4) go to google chrome
5) go to localhost:8080/myWebapplication
6) test the application
What bothers me is that sometimes this works and new or changed actions are correctly displayed, while sometimes my application uses the previous sturts.xml and obviously my tests will fail. Why does my browser show this erratic behaviour? Do cookies, the browser cache or refreshing have anything to do with this? To be clear, I restart tomcat (after cleaning) and I restart my browser.
Restarting the browser is not enough to clear the cache.
This is a known Chrome issue, I suggest you to turn cache off while developing.
Read more on Disabling Chrome cache for website development.