How to prevent browser from caching the page content?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain in detail 'javax.servlet' package?

537


What do you mean by mime type?

544


What is the requirement of servlet config and servlet context implemented and how are they implemented?

532


Which protocol will be used by browser and servlet to communicate

574


How to notify an object in session when session is invalidated or timed-out?

624






How httpservlet is different from the genericservlet?

558


What is httpservlet and how it is different from genericservlet?

596


What are the annotations used in servlet 3?

568


What is servlet in tomcat?

550


What is the procedure of invoking different servlet in a different application?

551


How do cookies work in servlets?

573


Elucidate servlet attributes and its scope?

564


How will two or three servlets interact or communicate with each other?

891


Explain load on start-up and its importance?

590


How can we refresh automatically when new data is entered into the database?

591