Avoid client side code caching in angular

240 Views Asked by At

How to avoid caching of JavaScript, CSS, image files which are mentioned in Angular.JSON & in components. Basically we want to know how to handle caching or is there any way by which Angular handles it on its own.

1

There are 1 best solutions below

4
Apoorva Chikara On

You can do that using the ng build command. You should use --output-hashing none.

ng build --output-hashing media

This will only hash the media files, there are different options to use as per your needs. Check this.