ArunJaganathan
ArunJaganathan

Reputation: 713

How to clear the cache in angularjs

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

Answers (5)

Prasenjit Mahato
Prasenjit Mahato

Reputation: 1324

1'st Step:

npm cache clear --force

2'nd Step:

npm cache verify

Upvotes: 3

Basil
Basil

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

Carlos Cruz
Carlos Cruz

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

Fahim zuhair
Fahim zuhair

Reputation: 128

first

npm cache clear --force

then

npm cache verify

Upvotes: 3

etah jet
etah jet

Reputation: 307

just do this npm cache clear --force it will work

Upvotes: 32

Related Questions