Prevent browser from caching resources

Sometimes we need to clear the browser cache or prevent the browser from caching resources so that we always get the latest output from the server.

Here is an example on how to prevent browser from caching resources

Write Enum for declaring constants

 Write the servlet filter

 Make corresponding entry to the web.xml file

That’s all. Thanks for your patience. Please leave a comment.

Soumitra

Software Professional, I am passionate to work on web/enterprise application. For more information please go to about me. You can follow on Twitter. You can be a friend on Facebook or Google Plus or Linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.