Hi ,
I would like to clear the cache memory of the browser using
servlet by which it will not allow the visitor to access the previous page(The User Account Area Page) after logout.
I tried it using the following block of code, but unfortunately its not working. I mean only logout is working properly...
Please help me out.
//Here is the code
HttpSession session=request.getSession(false);
response.setContentType("text/html;charset=UTF-8");
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","0");
if(session.getAttribute("IDPassword")!=null)
{
session.invalidate();
response.sendRedirect("SuccessfulLogout.jsp");
//request.getRequestDispatcher("SuccessfulLogout.jsp").forward(request, response);
}
Thanking you in advance...
Amitav Anand