shiro Jacinto
shiro Jacinto

Reputation: 155

How to fix javascript file referencing old version

My problem is when I edit my previous javascript or css file link to my html file, the function/code that I add are not functioning even I delete the whole code in my js file. The previous code only is functioning.

Upvotes: 3

Views: 2918

Answers (2)

deek
deek

Reputation: 1095

What server software are you hosting with? Apache? Express/node?

I noticed depending on how I configured something like forever or nodemon to host my express sites, it did not reflect changes when not using grunt. I had to restart them to get them to use the newly changed files.

Did you use a Yeoman generator?

Upvotes: 0

Dyrandz Famador
Dyrandz Famador

Reputation: 4525

It might be your cache were not deleted ,that's why it still using your previous javascript file.

To fix that:

  • Empty your cache

  • (In GoogleChrome ) Open developer tools( or press F12 ) then You can right click on refresh and select Empty Cache and Hard Reload

Your updated javascript now will be loaded.


CLEAR GOOGLE CHROME CACHE

CLEAR FIREFOX CACHE

CLEAR INTERNET EXPLORER CACHE

Upvotes: 5

Related Questions