Two way we can prevent angular2 browser cache
- you can add a querystring to load your components Example:- @Component({ selector: 'app-test', templateUrl: './test.component.html?p=' + Math.random(), styleUrls: ['./test.component.css?p=' + Math.random()'], });
2.You can add in index.html this code Example:-