It's possible to clear browsing history using javascript?
It's possible to clear browsing history using javascript?
If yes, how can 开发者_开发百科I do this?
Note: A lot of forums said no, but some said yes, so I'm lost.
EDIT
Note: I want to clear only the last pages in mydomain (random pages in mydomain).
No.
That would be a security issue, if it were possible: a website you visit could maliciously delete all your browsing history without your permission.
However, it is possible to clear the history in javascript within a google chrome extension. Take a look at chrome.history.deleteAll()
.
Even if you could, you shouldn't.
Javascript is a closed box; you can't change files on a clients computer, which is essentially what this would be doing.
So nope, you can't.
there are ways to go about preventing the user from going back a page, but to completely clear your entire browsing history is not possible. let alone deleting any of it
精彩评论