Question

When I update my code, and refresh the page, my server doesn't reflect the changes! It is still loading the old file? (this is running locally). I really don't understand why!

What I mean is that say I make a mistake, or decide to change a line of code. I fix the mistake, or change the line of code. But when I refresh the page, it is as though I have not done so. The mistake or the line of old code still remains behind and that code is ran!

Why?! I am using node's http-server to run my server on a Mac.

Was it helpful?

Solution

Angular sometimes comes with minimizing tools. If this is the case, you have to build your app using these tools to regenerate the files your browser should load.

If not, then probably it is a simple caching issue and you should clear your browser's caches.

OTHER TIPS

In firefox , press Ctrl+Shift+I , then click on the gear (settings icon) , look for the option DISABLE CACHE under Advanced Settings , check it , so that it doesn't cache your old code , instead display the new code .

Angular caches your template files. You need to clear the cache, Chrome Developer Tools comes with a setting to disable the cache while the developer tools are open.

Disabling Chrome cache for website development

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top