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

How do you load an image in a Servlet?

0 Answers  


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

0 Answers  


What are sessions in servlets?

0 Answers  


How can I send user authentication information while making URL Connection?

0 Answers  


What are some advantages of storing session state in cookies?

0 Answers  






What's the servlet interface?

0 Answers  


Why session tracking is needed?

0 Answers  


How do we share data using 'getservletcontext ()?

0 Answers  


If you want to modify the servlet,will the Webserver need to be ShutDown ?

9 Answers  


what is servlet life cycle?

3 Answers   Inforica,


Hi............ When i am started the tomcat server it started. but it not load the jar files wht we deploving file.suppose we load the wapp folder in webapps. At running time it show the below error in tomcat server INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 5.0\web apps\wapp\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, s ection 9.7.2. Offending class: javax/servlet/Servlet.class How to slove this problem in my system. plz give answer for this problem.

5 Answers  


What is the use of servletconfig interface?

0 Answers  


Categories