2
@Component({
  selector: 'some-component',
  templateUrl: `./app/component/stuff/component.html?v=${new Date().getTime()}`,
  styleUrls: [`./app/component/stuff/component.css?v=${new Date().getTime()}`]
})

Can I use like above in Angular 7?

I need to clear the browser cache. I am referred this answer and but this for angular 2.

Application hosted on the IIS

So far I have tried the below answers but no output.

1)Cache busting after deploying Angular 8 application

2)How to prevent Browser cache on Angular 2 site?

3)Clear browser cache in Angular

1 Answer 1

2

The only thing you need to do is making sure that the index.html is not cached (or for a very short time) See How to disable caching of single page application HTML file served through IIS?. All other resources are packaged by angular and cache busted by default.

Sign up to request clarification or add additional context in comments.

1 Comment

How I can do index.html is not cached?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.