Cookie on uri data page

My previous question on the same question gave me 8 negative votes. Hope now clearer. If you run

document.cookie ='ppkcookie1=testcookie;';alert(document.cookie); 

on any web page, the contents of the cookie appear in the message box. if you run the code on a very simple uri data page (you can copy and paste the following line in the address bar in FF or Chrome, since IE does not support it)

  data:text/html;charset=utf-8,<h1>hi people</h1><script>document.cookie='ppkcookie1=testcookie;';alert(document.cookie);</script> 

empty message field

Does this mean cookies cannot be used on uri data pages or is there some error in my part of the code?

+4
source share

All Articles