in reply to VVP: Cookies - what is in them?

First off there are two types of cookies. 'Session' and 'non-session'(creative eh?). The session cookies are only stored in ram, and last untill you shut down the browser window, then they die. The non-session cookies last untill a given date, then they die. You can see non-session cookies by going to \windows\cookies (on 98, if you arent on 98 try searching for 'cookies' and see if you can find a folder). And each cookie is stored as a text file here. Note that these text files arent generated untill you shut down the browser, so its hard to keep refreshing something to see the change. But anyways, this is all mostly pointless as theres a simpler way to do this.

simply type this: javascript:alert(document.cookie); into the address bar at the top of whatever page you want, and it will display all the cookies that page has set on your computer.


And for the 'non-english cookies', A) they might be url encoded, simply run it through the javascript method for that (go look it up.), or whatever. B) it might be encrypted, in which case, unless you know the key, your screwed.

Replies are listed 'Best First'.
Re: Re: VVP: Cookies - what is in them?
by JPaul (Hermit) on Apr 25, 2002 at 03:57 UTC
    The session cookies are only stored in ram, and last untill you shut down the browser window, then they die. The non-session cookies last untill a given date, then they die.

    Just a minor note, on some browsers (notably NetScape, and quite possibly (although untested) Gecko based browsers (Galeon/Mozilla/etc)) "non-session" cookies are stored in memory UNTIL the browser is shut down, at which time they will be written to disk.
    This is only important to think about when you are testing cookie dumping (and/or contents of cookies) and haven't had the precense of mind to close the browser in between sessions.

    Just something to think about,
    JP,
    -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --