0

If I'm working in my code with the browser open for about 5 min, everything is fine. Changes to my code updates after I refresh the browser.

But after some time my changes stop showing in the browser (even if I restart the browser). The only solution that works is, if I restart both the IDE and browser.

Is there anything I'm missing here? Because I believe that this should not be happening.

PS. This happens in both Visual Studios and Adobe Dreamweaver.

Red-X
  • 79
  • 1
  • 12
  • Please post your code; without it it is difficult to point out what the problem exactly is. – Sreetam Das Oct 05 '18 at 07:14
  • 2
    That's weird have you tried to refresh with ctrl + f5? – PEPEGA Oct 05 '18 at 07:14
  • @Patte I also immediately thought about `Ctrl + F5` after reading this question. While I was trying to produce an answer, you made a comment :) – Nguyen You Oct 05 '18 at 07:19
  • 1
    @TheDarkKnight It doesn't matter what my code looks like, because it have happened on almost every project I've worked with. – Red-X Oct 05 '18 at 07:30

2 Answers2

4

But after some time my changes stop showing in the browser (even if I restart the browser). The only solution that works is, if I restart both the IDE and browser.

Try to use Ctrl + F5

For more information: What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

Generally speaking:

F5 may give you the same page even if the content is changed, because it may load the page from cache. But Ctrl-F5 forces a cache refresh, and will guarantee that if the content is changed, you will get the new content.

Nguyen You
  • 8,537
  • 3
  • 20
  • 47
1

PS. This happens in both Visual Studios and Adobe Dreamweaver.

It has nothing to do with Visual Studio and/or Dreamweaver, it's all about caching - related to your browser.

As mentioned above you can use CTRL + F5 to force the browser to load your webpage from the network, not the cache. However, you can also use Incognito Mode in your Web Browser, it loads a fresh version as well, but that's not practical to keep opening a new Incognito Window whenever you need to load the latest changes - I am just giving you a hint on a different solution that might help!

I recommend taking a look at this question - Published in 2009, fairly old but solid! - and it will provide you with MANY different possible solutions!

Elharony
  • 711
  • 5
  • 17