Xampp and Ampps do not reload files on change

When I change a file in the directory, this change is not reflected in the web page displayed when I access it through localhost, but it does appear when I access it directly from the file path on my system. Why?

I am on a Windows machine. My files are stored in the C: \ Program Files (x86) \ Ampps \ www \ connor.dev folder. When I link directly to the 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 show and save in Sublime Text. When I access it by going to localhost / connor.dev / the changes are not shown. Even if I delete the file completely, it still shows up on localhost. It started recently on xampp, so I uninstalled it and used Ampps and now the same thing happens. If you need more information, please ask.


source to share

2 answers

Press Ctrl-F5 to refresh the page (not to use the browser cache).

If you still see previous pages or changes, then Apache has mod_cache caching, or PHP has its own opcode cache settings so that it doesn't update changes in X time.



This is due to the fact that apache mod_cache

caches resources.

For a quick fix. Just restart your Apache server.

In ubuntu I use this below command in terminal to restart Apache server

systemctl restart apache2


Now refresh your browser, then you will get an updated one.



All Articles