Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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.

share|improve this answer
aren't websites cached? that would give a slightly greater expiration to 'DOM-stored tracking information' than just memory. – n611x007 Dec 4 '13 at 8:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.