Is possible read the browser history with Javascript? If the answer is Yes, how can I do it? I want to read it and save it in a JS variable.
Asked
Active
Viewed 1.0k times
3
-
1I hope not ... Do you want to have any arbitrary website to be able to know what other sites you looked at? – Sirko Jan 30 '14 at 11:28
-
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history?redirectlocale=en-US&redirectslug=Web%2FGuide%2FDOM%2FManipulating_the_browser_history – gvee Jan 30 '14 at 11:29
2 Answers
5
No. Other sites visited by a user are their business, not the business of every website they visit. Browsers do not expose that information to web sites.
Browsers go to pretty serious lengths to plug anything that could leak a user's history to websites

Quentin
- 914,110
- 126
- 1,211
- 1,335
1
In general history is protected by the browser against javascript accessing it except through back and forward functionality.
Source From : Access my entire browsing history via Javascript

Community
- 1
- 1

Shivam Pandya
- 1,061
- 3
- 29
- 64