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.

Solution 1:

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. %>

Solution 2:

<%
Response.Cache.SetExpires(DateTime.Parse(DateTime.Now.ToString()))
Response.Cache.SetCacheability(HttpCacheability.Private)
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
%>

Solution 3:

<body onload="history.forward()">

Solution 4:

<%
response.setDateHeader("Last-Modified", System.currentTimeMillis());
%>

Like in Firefox, there is functionality Tools -> Start Private Browsing which doesn't store any session data. Is there anything that can be done by JavaScript to achieve this.

Answers


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.


Need Your Help

C# - Cannot commit changes to Access DB

c# database ms-access dataset commit

I'm working on a Windows Forms project that requires me to connect to an access database and navigate through records, and add/delete them. I've looked at a few tutorials online, and thought I foll...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.