Can we get browser history by using Javascript?

For privacy reasons, no it is not possible to read clients browser history data.

If you are trying to observe or generate data about visitors for only on your domain, its possible to keep page information with sessions and cookies.

you can also collect click data on your websites clickable objects by your own scripts which are sending the data by ajax requests.

if you are running a one page application type website and generating your own url’s with “pushState()” function, you just need to add some extra code to collect that data and send the information with ajax on page/url changes.

Leave a Comment