You cannot get this information from the browser. It would be a security breach if you could.
You can only get the last site from the document.referrer, this does not work in all versions of
Microsoft Internet Explorer.
©2018 Martin Webb