Reputation: 713
I am doing an angular project,but after every changes in java-script file I want to clear the cache.So I want to know is there any angular code for deleting or removing the cache file?
Upvotes: 22
Views: 178435
Reputation: 1324
1'st Step:
npm cache clear --force
2'nd Step:
npm cache verify
Upvotes: 3
Reputation: 1893
Just move ahead with the following command
npm cache clear --force
For verifying, you can run the following command to check the contents of the cache folder, garbage collecting any unneeded data, and verifying the integrity of the cache index and all cached data.
npm cache verify
Upvotes: 8
Reputation: 505
How about adding this tag to index.html ? Is this valid?
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
Upvotes: 3