When we signout the form How can i disabling back button and,
not only disabling back button but also delete history from browser.
Suppose i used
<script language="javascript" >
javascript: window.history.forward(1);
</script>
to disable back button , its working.
when i go to back list and click previous histories it shows data. so data hiding is important to my project. how can i delete browser history plz help me as early as possible. ok bye

JavaScript != Java

Find a JavaScript Forum

Also, I would consider any code which attempted to automatically delete anything from my machine (whether it were browser history or otherwise) without my permission as malicious code.

Your intentions may not be malicious, but you should seriously think about how users of your website are going to react. You'll find your site losing its visitors pretty quickly!

You can't do it and it's a good thing. Altering a user's browser is very bad form.

You can't do it and it's a good thing. Altering a user's browser is very bad form.

I was fairly sure it wasn't possible when i wrote that message, Else I'm sure by now I'd have been directed to one of a-lebenty-something "joke" websites which remove your browser history and fiddle with your settings (in such a similar vein to those which used to use recursive popup windows in order to crash your browser - oh, the hilarity!)

Hi There,

well there is not any specific way to remove the client side history,
but you can use this function, use this function body onload

Write in <head>

<script language="JavaScript"><!--
function DisablingBackFunctionality()
{
var URL;
var i ;
var QryStrValue;
URL=window.location.href ;
i=URL.indexOf("?");
QryStrValue=URL.substring(i+1);
if (QryStrValue!='X')
{
window.location=URL + "?X";
}
}
//--></script>

write in body tag

<body onload="DisablingBackFunctionality();">

there are some more way to do this


Rahul Dev

think the other way around. instead of deleting the history, don't create it in the first place. there's various methods, all require server side scripting or public web proxies. basic method is, have a blank page that inserts the "secret" page when it's neccessary.

the history will only see the blank page. use a recognised (secret of course) POSTDATA message to trigger the insertion of the secret page, otherwise the "blank" page will always show it.

using an iframe/frame to insert the "secret" page isn't good enough, the history will still see it.

i use a server-side script, when i logout i redirect to a page that autoredirects to the login page, then if i hit back i'll get redirected to the page that autoredirects to the login and so on (ad infinitum if i keep hitting back).

i use a server-side script, when i logout i redirect to a page that autoredirects to the login page, then if i hit back i'll get redirected to the page that autoredirects to the login and so on (ad infinitum if i keep hitting back).

Hey there!
You sholuld use:
location.replace("http://yourRedirPage.ext");
instead - and congrats! :')
- you're done!

is it bad form to help a women who is in fear of getting beaten or getting killed by her abusive partner when the abuser sees she was looking at domestic violence websites to try to find a way out? this is at least one legitimate use of deleting browser history. perhaps there is a way to remove a particular website from the history? any help would be more than appreciated by not just myself but the countless women out there who are too afraid to even use the internet to find help.

let me just explain what i am trying to do. a lot of domestic violence sites have an "escape" button that, when clicked, merely takes the visitor to a different website. it has to do more than that. it has to delete all traces of the person ever looking for help or the abuser could find it and then react. please if anyone has any idea of how to do this, please help us.

maybe there is a way to prompt the browser's "delete history" function? so the user clicks, "escape" and, in firefox for example, the "Clear recent history..." prompt pops up so the user can click, "Clear now." that way you are not making the choice for them.

btw, I've tried the location.replace("http://yourRedirPage.ext"); approach to no avail. I wonder if that even works on newer browser versions or if I am doing something wrong.

You can delete the history for any browser with only 3 keys....

It deletes for any internet browsers such as (Firefox , Google Chrome , Internet Explorer and etc)

Ok so the keys are.........

"Ctr+Shift+Delete" Without the "@!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.