This is a test of parsing cookies.
df=new Date(); df.setDate(df.getDate()+200); document.cookie='somevar="RVALUE"; path=/;expires=' + df.toGMTString(); document.cookie='s2=this is a " in the middle;path/;' document.cookie='s3="this is an escaped \" in the middle";path/;' document.cookie='s4=;'; document.cookie='s5="some text; moreS5text=notreal;"'; document.cookie='s6="some text; moreS6text=notreal;'; document.writeln("
result:
" + document.cookie);
Observed results:
Safari 4.0.5
s2=this is a " in the middle; s3="this is an escaped " in the middle"; s4=; s5="some text; moreS5text=notreal;"; s6="some text; somevar="RVALUE"
Internet Explorer 8.0.6
s2=this is a " in the middle; s3="this is an escaped " in the middle"; s4; s5="some text; s6="some text; somevar="RVALUE"
Arora / QtWebKit from Qt 4.6.2
s2=this; s3="this is an escaped "; s4=; s5="some text; moreS5text=notreal;"; s6="some text; moreS6text=notreal;"; somevar=RVALUE
Firefox 3.6.3
s2=this is a " in the middle; s3="this is an escaped "; s4=; s5="some text; moreS5text=notreal;"; s6=; somevar="RVALUE"
Chromium 5.0.322.0 (38467) Nightly
s2=this is a " in the middle; s3="this is an escaped " in the middle"; s4=; s5="some text; s6="some text; somevar="RVALUE"
Reload and you'll see cookies below: