body {
background: url("
javascript:
document.body.onload = function(){
...custom js here...
}
");
}By specifying a rule like this in the browser's user stylesheet, it might even be possible to run a custom set of Javascript commands on opening of any visited website. (Although my brief attempt at making this work proved unsuccessful.) [via webgraphics]expression() syntax to simulate the css max-width property, which works in Mozilla/Opera but not in IE.document.myForm.myInput.value
document.someImage.srcdocument.forms['myForm'].elements['myInput'].value
document.images['someImage'].srcchar=' .:*sS#$'.split('');char=new Array(' ','.',':','*','s','S','#','$');<form onsubmit="this.target=event.shiftKey?'_blank':'_self'"> cookies = [];
for (c in C=document.cookie.split('; '))
{cookies[(cs=C[c].split('='))[0]]=unescape(cs[1]);}Now you can access your cookies like this:alert(cookies['myCookie']);
<a href="javascript:window.open('foo.html');"><a href="#" onclick="window.open('foo.html');"><a href="foo.html" onclick="window.open(this.href);return false;">return false; in the href can mess up some browser's popup-blocking, so watch out if you care about that (haven't noticed it myself, but then again, I almost never use popups). [via]for(i in ['larry.gif','moe.gif',
'curly.gif'])(new Image()).src=M[i];
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...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.