Why are CSS or JavaScript changes not applied after clearing the browser cache?
Sometimes developers encounter a situation where fresh style or script code does not appear on the page even after a standard cache clearance. This can greatly drag down the debugging and error-searching process.
One of the reasons is caching at the level of intermediate proxy servers or CDNs. In this case, files may be loaded from intermediate storage rather than your development server.
To solve this problem, use a hard page reload in the browser. It is also useful to enable the disable cache option in the developer tools network tab so that files are always reloaded.
Adding a version or hash to the names of script and style files in the HTML markup helps. This forces the browser to treat files as new with every change.
Do not forget to check service workers if they are registered in your project. They can save old versions of files in offline storage and serve them regardless of regular cache settings.