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 is multiple server?

1 Answers  


How to deal with multi-valued parameters in a servlet?

2 Answers  


Explain how to improve Servlet Performance?

1 Answers   BirlaSoft,


What's the use of servletcontext?

1 Answers  


How is the get () method different from the post() method?

1 Answers  


What are the annotations used in servlet 3?

1 Answers  


What are the mechanisms used by a servlet container for maintaining session information?

1 Answers  


What is the difference between the servlets and cgi programs?

1 Answers  


How is a servlet implemented in code?

1 Answers  


Why is a constructor needed in a servlet even if we use the init method?

1 Answers  


Explain the difference between servlet and cgi?

1 Answers  


What are the differences between forward() method and sendredirect() methods?

1 Answers  


Categories