C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Training   ASP.NET Web Hosting    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

Play Silverlight Games or Submit your Silverlight applications and earn 90% AdSense revenue.

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Forums » .NET » ASP.NET »

How to clear browsing history


Posted Date: 01 Jan 2009      Posted By: Rahul P R      Member Level: Bronze     Points: 1   Responses: 4



Hi

When i SignOut from my application, i want to clear all my browsing history.
Otherwise after SignOut when i click Back button in browser it will go to the previous taken page.Please give me a solution to clear my browsing history.
or tell me what are the functions to be written while SignOut





Responses

Author: Deepika Haridas    01 Jan 2009Member Level: DiamondRating:     Points: 2

Hi,

<"javascript:location.replace('<Page.html>')">
Check this code.

im not sure whether we can clear browser history, but we can avoid back button functionality by the above code

++++
Thanks & Regards,
Deepika Haridas
DNS MVM

Please Rate this Response if you found it useful

Blog - www.angeldeeps.blogspot.com
Community - www.dotnetspider.com/sites/303/-TECHIE-QUESTIONNAIRE.aspx



Author: Gaurav Agrawal    01 Jan 2009Member Level: DiamondRating:     Points: 4

use this code

By using java script it can be done
<script language="JavaScript">javascript:window.history.forward(1);</script>
Or
<A HREF="PageName.htm" onclick="javascript:location.replace(this.href); event.returnValue=false; ">No back button when you do this.</A>
Or
<html><head><title>Back Button Demo: Page One</title>
<script>
function backButtonOverride()
{ setTimeout("backButtonOverrideBody()", 1); }
function backButtonOverrideBody()
{ try { history.forward(); } catch (e) { }
setTimeout("backButtonOverrideBody()", 500);
}
</script></head><body onLoad="backButtonOverride()">
<h1>Back Button Demo: Page One</h1><a href="page2.html">Advance to Page Two</a>
</body></html>

GA

Thanks & Regards,

Gaurav Agrawal
Sr.Software Engineer
gaur1982@yahoo.com
09829373514



Author: divya    01 Jan 2009Member Level: GoldRating:     Points: 3

Try this
write down following code in Logout button.


protected void LogOut()
{
Session.Abandon();
string nextpage = "Logoutt.aspx";
Response.Write("<script language=javascript>");

Response.Write("{");
Response.Write(" var Backlen=history.length;");

Response.Write(" history.go(-Backlen);");
Response.Write(" window.location.href='" + nextpage + "'; ");

Response.Write("}");
Response.Write("</script>");

}



Author: Rahul P R    01 Jan 2009Member Level: BronzeRating:     Points: 2

I have tried all the above methods.
But again history is not cleared.
I am using windows authentication methods.
I don't know what is the problem with this.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Using Asp.net how to invoke Onscreen keyboard(osk.exe)and set the language
Previous : textarea capture
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use