Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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

1 Answer 1

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
1  
Holy shit, that's terrible. –  ChocoDeveloper Jun 12 '13 at 12:59
    
aren't websites cached? that would give a slightly greater expiration to 'DOM-stored tracking information' than just memory. –  naxa Dec 4 '13 at 8:20

Your Answer

 
discard

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.