Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 73845

Why is server ignoring changes in the code files even though cache is disabled?

$
0
0

I test an html/js code on my localhost (Windows 7, Chrome) and about 50% of the time code changes are not reflected in the browser (I see it with Dev Tools/Sources).
There are a ton of advice on the internet, but neither seems to work:

  • Rightclick on the reload and chose "Empty cache and Hard reload" - doesn't help in 30% of the cases.
  • Disable cache in the Network tab of the Chrome Dev Tools - doesn't help.
  • Add <meta http-equiv="Cache-control" content="no-cache"> in the header - doesn't help.
  • Replace <script src="common.js"></script> by <script src="common.js?blabla"></script> - helps in 60% of the cases, but you need to do it after every change is a huge chore. Also, it doesn't work with html changes.
  • Copy a file to a new file (like index.html to index2.html) and replace the file name in the code - always works, but it is an even bigger chore.

The exact same problem present when I commit the code to github.io

Please help me to make it so the site reflects the code changes immediately.


To simplify: I've created a file index3.html and put only "hello world" there. Opened the file in the browser. Changed to "hello world2" - the browser updated the content. Changed to "hello world3" - the browser still was showing "hello world2" even after multiple reloads and "Empty cache and hard reload". I changed to "hello world4" - the browser still showed "hello world2". In for 4 hours I changed to "hello world5" - the browser still shows "hello world2". This file I edited with basic notepad.


Viewing all articles
Browse latest Browse all 73845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>