Showing posts with label If-Not-Match. Show all posts
Showing posts with label If-Not-Match. Show all posts

ETags and Browser Cache


Caching resources on the browser is a key aspect to minimize redundant trips to the server and reduce the load on it. This works well for data that is static. But, there are cases where the data changes every once in a while (although less frequently) and you would want the browser to get the latest data without waiting for the cached data to expire. e.g. consider a scenario where a new version of the application is deployed with changes to css and javascript and you want the user to experience these changes without forcing them to manually refresh their cache. One option you might consider is to make these resources non-cacheable and compromise the page performance a bit. Entity tags( or ETags for short) help you cache such resources, without the performance compromise.