How to load new urls sequentially to hide browser history using vanilla Javascript?

I'm working on a domestic violence site for women who are in abusive relationships and want to help get out. I need to create a Safe Logout button on a page so that a user can quickly log out of the site if their abuser enters the room and sees that they are looking for help.

Desired functionality:

  • Press the button to take you away from the current page.
  • Kill 20 pages of likelihood (urls) that will be added to the browser history so that it will hit the Domestic Violence site down in history and almost discard the back button.
  • It should never load those "bogus URLs" and end up unloading the user on a page like Google or YouTube.

EXAMPLE OF DESIRED FUNCTIONALITY (red button on the page below): http://www.ncadv.org/

Ideally, this will happen within 2 or 3 seconds, as time is of the essence for someone in a domestic violence situation. Vanilla Javascript is preferred, jQuery will work as well.

Thanks for your help, many people will appreciate your input.

+3


source to share


1 answer


So that the site you are showing as an example uses HTTP Referrer ..

What you can do is have an anchor that links to the same url as in the example site.

So, in your HTML:

<a href="http://abconlinenews.info/localnews.php">Go to safety</a>

If you want to use different URLs, you will have to create your own pages, each containing a referrer on a page that does not exist.



Something like:

function trigger() {
        setTimeout("setPage();",10);
}
function setPage() {
    window.location="/nextPage.php";          
}

      

and HTML:

  <body onload="trigger();">
        <h1>Not Found</h1>
        <p>The requested URL was not found on this server.</p>
  </body>

      

0


source







All Articles