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”);

Read the full book at www.amazon.com
Posted in JSP, JSP Interview Questions

Leave a Reply

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

*