Sadiqul
Sadiqul

Reputation: 145

How to clear browser cache using angular 7 in production

In my project I am using .net core and angular 7. I need to clear browser cache after every deployment. ng build --prod --output-hashing=all, didn't work for me. Please help.

Upvotes: 0

Views: 210

Answers (1)

Hasan Khan
Hasan Khan

Reputation: 26

Just add the following tag in web.config file

<configuration>
  <system.webServer>
    <staticContent>      
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:01:00"/>//1 minutes
    </staticContent>
  </system.webServer>
</configuration>

Upvotes: 1

Related Questions