1

For example as the value of an attribute of a html tag.

<div cookie='id=1234'></div>

Then if the user deletes the cookies while at least one page of the website is open, a javascript script would regenerate the cookie by reading the DOM.

Do you know of any websites that are doing this already?

1 Answer 1

5

No, I don't know any website that is doing this. Simply, because it's a silly idea. The DOM is in the memory, and when you access it you're accessing objects stored in the memory. If a website wants to do this, it would simply store the cookie in a JavaScript variable.

var Cookie = 'COOKIE_VALUE';

But there are much much better ways of creating sticky cookies. A good example is the evercookie.

1
  • aren't websites cached? that would give a slightly greater expiration to 'DOM-stored tracking information' than just memory.
    – n611x007
    Dec 4, 2013 at 8:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .