The Meaning of Cookies

Netscape Cookies

Cookies are small pieces of information that your web browser stores on your computer, as requested by websites. Most websites request such cookies to be stored nowadays, but most of the time these are merely used for navigational purposes so that the website can present you with webpages that are tweaked depending on where else you have been on the site. Most modern browsers give you the ability to block and reject cookies on a per-site basis, but very few give you any warning about the properties of the cookie (how long your browser will store the cookie, and which other websites can see the cookie, for instance). Their biggest commercial use is for advertisers to track conversions through a site.
The layout of Netscape's cookies.txt file is such that each line contains one name-value pair. An example cookies.txt file may have an entry that looks like this:
.netscape.com TRUE / FALSE 946684799 NETSCAPE_ID 100103
Each line represents a single piece of stored information. A tab is inserted between each of the fields. From left-to-right, here is what each field represents:
  • domain - The domain that created AND that can read the variable.
  • flag - A TRUE/FALSE value indicating if all machines within a given domain can access the variable. This value is set automatically by the browser, depending on the value you set for domain.
  • path - The path within the domain that the variable is valid for.
  • secure - A TRUE/FALSE value indicating if a secure connection with the domain is needed to access the variable.
  • expiration - The UNIX time that the variable will expire on. UNIX time is defined as the number of seconds since Jan 1, 1970 00:00:00 GMT.
  • name - The name of the variable.
  • value - The value of the variable.

Internet Explorer Cookies


myCookieA
popup_ad
www.theonion.com/onion3806/
1088
3596769152 29473513
2888195648 29473312
*
myCookieB
...
  • Variable name = myCookieA * Variable value = popup_ad
  • Host name = www.theonion.com
  • Path = /onion3806 (note that in this format, the host name and the path are concatenated together)
  • Flag = 1088 (I'm not sure what this is all about; I've also observed 1024 as a value here; I think it's a True/False flag to indicate whether or not the cookie is secure)
  • Date and Time of Cookie Expiration = 3596769152, 29473513
  • Date and Time of Cookie Creation = 2888195648, 29473312

LWP Cookies

These cookies are set by programming languages such as Perl and PHP.
#LWP-Cookies-1.0
Set-Cookie3: MyCookieA=popup_ad; path="/"; domain=www.theonion.com; path_spec; discard; version=0


Comments

It's quiet in here...Add your comment

Mirror

(more)

Recent Updates

17 Oct : Cyclocross
07 Jul : Do It Yourself!
27 Oct : My Car Costs
13 Feb : Great Days Out
02 Sep : Nature
25 Nov : Piano for the Amateur
14 Nov : Measure
12 Oct : Simple Programming Exercises
11 Oct : Model Railways
01 Sep : The Developer's Apple Mac
Laptop Questions
Your laptop make of choice?







Survey Results For US