Cookies
Cookies are small bits of data that can be saved to the client's hard
drive by a CGI program or a script.
They are extraordinarily limited in
scope and can contain only text - no binary code.
They can only be accessed by the page which created them, cannot be
more than 4k in size and a page can only create a single cookie.
They are used to store custom disply informaton (for "MY Page" type
functionality), keep persistant values across pages, keep simple stats
for your visit, and are used in many "shopping cart" applications.
Cookies are a general mechanism which server side connections (such as
CGI scripts) can use to both store and retrieve information on the
client side of the connection. The addition of a simple, persistent,
client-side state significantly extends the capabilities of Web-based
client/server applications.
A server, when returning an HTTP object to a client, may also send a
piece of state information which the client will store. Included in
that state object is a description of the range of URLs for which that
state is valid. Any future HTTP requests made by the client which fall
in that range will include a transmittal of the current value of the
state object from the client back to the server. The state object is
called a cookie, for no compelling reason.
This simple mechanism provides a powerful new tool which enables a
host of new types of applications to be written for web-based
environments. Shopping applications can now store information about
the currently selected items, for fee services can send back
registration information and free the client from retyping a user-id
on next connection, sites can store per-user preferences on the
client, and have the client supply those preferences every time that
site is connected to.
Quadzilla Archives
The cookie is nothing more than a text file
assigned to unique visitors to your site.
|