How to prevent browser from caching the page content?



How to prevent browser from caching the page content?..

Answer / janet

Before sending the data to the browser,write the follwing code.
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Servlets Interview Questions

What happens, if server sends a cookie to a browser that doesn't supports cookies?

2 Answers  


What do you mean by web applications? Explain web application directory arrangement?

0 Answers  


How to handle exceptions thrown by application with another servlet?

0 Answers  


What is Generic Servlet and how it is different from Http Servlet?

5 Answers   Wipro,


What is a server side include (ssi)

0 Answers  






What are the types of servlet?

0 Answers  


What is the difference between a generic servlet and http servlet?

0 Answers  


How to handle the debug errors in servlets?

2 Answers  


Tell us something about servletcontext interface.

0 Answers  


Difference Between Web Server and Application server ??

4 Answers   PWC,


What is ServletContext() and what is its use?

9 Answers   Prime Technology, TCS,


What is the difference between get and post methods?

0 Answers  


Categories