How to skip history of visted page in browser
Due to some security constraints, there is requirement that the page visited should not be listed in browser's history.
So the pages need not to be shown in the history at all.
I have tried following ways but failed.
1. <% 2. session.invalidate(); 3. response.setHeader("Cache-Control","no-cache"); 4. response.setHeader("Cache-Control","no-store"); 5. response.setDateHeader("Expires", 0); 6. response.sendRedirect("home.jsp"); 7. %>
<% Response.Cache.SetExpires(DateTime.Parse(DateTime.Now.ToString())) Response.Cache.SetCacheability(HttpCacheability.Private) Response.Cache.SetNoStore() Response.AppendHeader("Pragma", "no-cache") %>
<% response.setDateHeader("Last-Modified", System.currentTimeMillis()); %>
You can't rely on client side when security matters. All browsers have different implementation for history. You should rely on a server side solution.