A cookie is a variable that via the browser temporary can be stored on a client's computer. As all variables a cookie has a name and a value. On request of the web server (the website) the browser can retrieve this cookie and send it back to the server.
Cookies are stored in a text file whose exact name and location depend on the user's operating system and browser.
- Preference Cookies They store your preferences. For example they can contain your ZIP code to get easily the local weather forecast.
- Logon Cookies These can be used for an automatic logon when you visit your favorite forum.
- Tracking Cookies They provide a more accurate count of site visitors. These cookies can insure that someone who visits your site 3 times per day isn't counted as three different visitors.
Below is an example of a sample line from a Netscape cookie file.
There are seven variables within each cookie, that are described below:
- Domain: The domain that created the cookie, and that can read the variable.
- Flag: This tells if all systems within the above domain can access the variable. This value will always be TRUE or FALSE.
- Path: This is the path that the variable can be used within. The "/" in the above example indicates that the variable can be used within the entire Web site.
- Secure: This is a TRUE or FALSE value, which tells if a secure connection (e.g., SSL) within the above domain is needed in order to use the cookie.
- Expiration: This shows when the cookie will expire in UNIX time. UNIX time is defined as the number of seconds since Jan 1, 1970 00:00:00.
- Name: The name of the variable being set. This can be any unique name.
- Value: This shows the value of the variable. In the above example the value is set to a computer's IP address, and then some unique identifier which is probably used within a proprietary database.
Unix Time Stamp Conversion
With the above form you can calculate the expire date of a cookie. Enter the Unix Time Stamp and click on the submit button. Look on your computer for some cookies, or use the date from the example cookie.
The story above is the minimum to know about cookies, a lot more can be found on the web about thses cookies. My favorite place is cookie central
PID: 7008 CLT: 0.013 LMD: 2013-Aug-17