How will you prevent caching of HTML output by web browser in JSP?

We can use set the header in response object for Cache-Control to specify no caching.

Sample code is as follows:

response.setHeader(“Cache-Control”, “no-store”);
response.setDateHeader(“Expires”,”0”);

Leave a Reply

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