What is stored in a cookie?
When you open one of the cookie text files with Wordpad you get
something that looks like this: (This cookie is from CNN.com) .
EditionPopUp
seen(sh:1&id:0)
cnn.com/
1088
3740570240
29552060
3056013008
29550652
*
CNNid
189370e0-4667-1047136727-93
cnn.com/
1024
3919976448
30096012
80886432
29549958
*
All cookies have a variable name, a variable value, a host, a
creation time and date, an expiration time and date, and a flag to
indicate whether or not the cookie is secure. In this case,
there are two cookies. The first one has the following
properties,
- Variable name = EditionPopUp
- Variable value = seen(sh:1&id:0)
- Host name = cnn.com
- Flag = 1088 (This is likely a flag to indicate whether or not
the cookie is secure; but I have not yet been able to find
somewhere what the code exactly stands for.)
- Date and Time of Cookie Expiration = 3740570240, 29552060
- Date and Time of Cookie Creation = 3056013008, 29550652
This is followed by an asterisk (*) and then the second cookie
(with Variable name = CNNid, Variable value =
189370e0-4667-1047136727-93, etc.).
Why are the date and time stored in such a strange format?
Internet Explorer internally stores the time and date as
a 64-bit number, showing date and time in units of 10 E-7 seconds
that have passed since January 1, 1601.
Externally, Internet Explorer breaks the 64-bit number down into
two 32-bit numbers, the high part and the low part of the 64-bit
number. These are the two numbers that you see.
Because the 64-bit number has been broken into two 32-bit
numbers, the numbers seem difficult to interpret. However, you can
still deduct the date and time from them. The bottom number is the
most significant. This shows time and date in units of 429.4967296
seconds since January 1, 1601. The top number shows the time since
the last unit of 429.4967296 seconds has passed, in units of 10 E-7
seconds.
From this you can deduct that the expire date, which is stored
in your cookie by the numbers (3740570240,29552060) is in fact
March 18, 2003 9:22:10 PM. Note that this time is in United States
Eastern Standard Time; Internet Explorer stores the time as UTC
(Universal Time, also known as Greenwich Mean Time).
|