Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to detect a visitor's browsing history using JavaScript or PHP?

Tags:

javascript

php

I want to check if my site's visitors have visited another particular site before coming to mine.

I know how to use JS and PHP to check to see (via referrer info) if the user has just come from that site to mine, but I would like to be able to detect if they have visited this site at any time before (not just immediately before coming to my site). Can this information be detected?

like image 433
Lilacs Avatar asked Jul 19 '10 01:07

Lilacs


2 Answers

Unfortunately, this is possible this is possible.

You can apply a CSS rule to a:visited that has a background image for a PHP script.

like image 90
SLaks Avatar answered Sep 19 '22 14:09

SLaks


You used to be able to do it (with JavaScript and the CSS psuedo class :visited), but browsers have fixed that exploit.

like image 34
alex Avatar answered Sep 20 '22 14:09

alex