6 ms·
can anyone explain the browser bug they are leveraging?
by nestlequ1k 17y ago
can anyone explain the browser bug they are leveraging?
- Gmo 17y agoIt's using the :visited css pseudo-class. If you put visited link in a different color in your css, you can then check what is the current color of the link with Javascript, and from that infer wether the link has been visited or not
- adrinavarro 17y agoNot really a browser bug: <style> .first:visited {background:url(visited-ycombinator.png)} .second:visited {background:url(visited-twitter.png)} #layer {text-indent:-10000px} </style> <div id="layer"> <a href="http://news.ycombinator.com/ class="first">first</a> <a href="http://www.twitter.com// class="second">second</a> </div> That code will hit a PNG file if you visited the link. Now just replace the PNG for a pixel beacon which logs every hit and it's done.