Button that closes page and deletes from history?

Hi,

You can’t access or delete a users history. This is private data stored deep within the browser. Only a user themselves can delete their own browser history / cookies etc. from the menu bar or settings / preferences.

Closing the current tab / window is easy to do with a stack like ActionHost. You will want to create a simple link or button in your page like this:

<a href="#">Close Window</a>

In the ActionHost stack, set the Trigger Value to the same label as your link (e.g. Close Window), set Action Type to Execute Custom jQuery. In the jQuery Code box, enter:

window.close();

Now you will have yourself an instant button that should close the current tab or window on any modern browser. A screenshot of the ActionHost settings are shown.

00

Of course, you can do it without ActionHost, using vanilla Javascript or your own jQuery. But the code is complicated if you go the DIY approach. ActionHost makes it way faster and easier. Plus you can use ActionHost for loads of other link manipulation tasks too. So it is one for the toolbox.

3 Likes