Client-side cookies are a mechanism by which servers can both store and retrieve information on the client side of the connection. Servers can send cookies specific to URLs on the site, and cookie-capable clients (e.g. Netscape) will transmit cookies stored from previous sessions each time they reconnect to the URls. As a client moves around a site, the server can send cookies in response to different actions so the client stores state that the server may need later. The client stores the cookies in its "cookies" file, and if the same URL is later revisited, sends the cookies back to the server. The server may use this information to customize behavior or page layout according to particular users' preferences or earlier actions.
Uses for cookies include:
The macro http:with-cookie-values and functions http:set-cookie-http-headers provide a convenient interfaces for CL-HTTP developer to use cookies in response functions. Together, these two facilities allow the application to store information on the client and access that information in response functions.
Application may wish to use http:write-to-armor-plated-string and http:read-from-armor-plated-string to protect Lisp data from damage in transit.
You can try an example using cookies called computed-cookie-form. The source code for this example is available in http:examples;exports.lisp, under the subheading Client-Side Cookies.