Reputation: 3671
I have been using XAMPP to connect to localhost to do editing on my computer for websites. I have been using it for over a year now and in the past whenever I would update the local file, I could refresh the page on my browser and it would immediately update. Now, I can't get it to update even if, for example, an image file has changed.
I'm wondering if it's an issue with cookies (which I haven't had in the past). Is there a common reason that this happens? I couldn't find anything upon a search. Thanks for the help!
Upvotes: 16
Views: 70101
Reputation: 436
With Flask the only solution that worked for me was to stop and run again (flask run)
Upvotes: 0
Reputation: 101
Just delete all the temporary browser-related files, I used C-Cleaner.
Add header <meta http-equiv="Cache-control" content="no-cache">
I solved the issue using this method.
Upvotes: 10
Reputation: 562
I've had the same problem and solved it simply by reloading the current page, ignoring cached content. There is a shortcut that I know works for Chrome and Firefox:
For PC:
Ctrl + Shift + R
For Mac:
Command + Shift + R
I hope it will make life easier for some people.
Upvotes: 33
Reputation: 1
I fixed mine by renaming the php file (in this case I deleted the 'e' in 'index.php', then added it back)
Upvotes: 0
Reputation: 538
In order to fully update/refresh your website , you need to use this command:
Ctrl+F5
This forces the browser to fully update the changes you're made to the files. This works if you have made changes in your CSS file(saved) but a browser-refresh doesn't reflect the new changes. In this case, the regular F5 refresh won't work.
For Mac OS: Command+Shift+R
Upvotes: 5
Reputation: 1
I met the same problem when I used xampp with chrome(mac). I tried several ways to solve it such as clearing the chrome or adding extra code in the html file. But neither works. Finally, I simply solved this problem by using safari instead chrome.
Upvotes: 0
Reputation: 41
I know this is an old question but hopefully, my answer helps someone in the future. The solution that worked for me was to delete the folder containing my code in htcdocs and replace it with an updated folder of code. This required me to keep an original folder of my code in a different folder which I modified with updates and made a copy of to replace the outdated code stored in htcdocs.
Upvotes: 2
Reputation: 11
I thought this was happening with me but I had basically made a very basic but deceptive error: I had moved the .php file to a new folder on the server AFTER having openend it in Notepad to edit it. I had entered the new URL in the Web browser to account for this move in order to view the page generated from the .php file but I was still working on the file in Notepad openeed BEFORE I moved it. Consequently, I was saving changes to the file pre-move and not able to understand why on earth it wasn't changing the page in the browser. Dumb perhaps but had me perplexed.
Upvotes: 1
Reputation: 1
I experienced this is issue recently using Django 2.1. I tried every browser, cleared my cache multiple times, triple checked that I was using Python's SimpleHTTPServer in the same directory I was writing my code, and even did a full reboot... No luck.
Right before throwing my MacBook out the window, I solved the problem by changing my Debug
setting from False
to True
. Why did this work? I'm not quite sure since the documentation for this setting doesn't mention that kind of behavior at all, but it was the only thing I could remember recently changing to possibly allude to this ghost bug. If anyone has a specific source to confirm this information, please comment and I will edit my answer.
Hope this helps anyone about to Hulk smash their computer :-)
Upvotes: 0
Reputation: 843
I've seen other people with the same problem. They've just moved to WAMP. If there is not a specific reason for you to stick with XAMPP you could give it a try. Hope this helps.
Upvotes: 0
Reputation: 444
First thing to try would be clearing browser history/cache and reloading the browser.
If you enabled some kind of caching that might also explain it.
You could test by creating a new page on localhost and see if it works. If so, then check that any pages you're changing on localhost are actually being updated (check the file modified times and close/reload the source to see if the changes are actually there).
Upvotes: 12