The detection of visited links is disabled as a privacy measure. And thanks for that.
Ref. privacy-related changes coming to CSS :visited
In short, it can't be done. That said, there might be hacks, but those would most likely quickly be patched and as a result being unreliable.
From what I read, this is implemented in most browsers.
As an example of how one could hack the history is using timing attacks. That is in short:
- You want to know if user has visited
aleister_crowley.com
- You find an item which all users would have cached, lets say
aleister_crowley.com/profile.jpg
- You add a script to load this picture in your site, and time how long it takes.
If user has visited the page the image would load quickly due to caching in the users browser. As such you can estimate the user has, in fact, visited that page.
Then of course, this would be a case were your site has flipped to the dark side.