0

I am creating a page which will be shared on social platform, when user will click to it, it will run in phone/web browser and on load it will download a .apk file in phone or open a website in browser of laptop/desktop.

But we don't want to keep this page in history of the browser. How we can do this using JavaScript or jQuery?

Anurag Ranjan
  • 105
  • 13
  • I do not think what you are asking for is possible. The browser is the software used to view/download the payload you are presenting to your user and if a developer's script could access this info it would be very insecure, as an XSS attack could steal every visitor's history. As far as I know JS cannot be used to remove the history of visited sites from a brower without plug-ins and this answer supports that: https://stackoverflow.com/a/20064623/8382028 – ViaTech Dec 21 '18 at 13:45
  • 1
    That 2013 answer is rather out of date. I believe you can do this with [history.replaceState()](https://developer.mozilla.org/en-US/docs/Web/API/History_API#The_replaceState()_method) (or possible even just `location.replace()`) though I'm not familiar enough with it to attempt a full answer – Daniel Beck Dec 21 '18 at 13:48

0 Answers0