: Let's take it one step at a time:
- Writing cookies is more complicated. The easiest form of cookies are session-only cookies, which only lives as long as the browser window. These are written simply like this:
- Deleting cookies is done by overwriting a cookie, setting the expiry time in the past. Thus,
where path and domain MUST be the same as they were when the cookie was originally set.
'expires=Thu, 01-Jan-70 00:00:01 GMT;'+
- Detecting cookie support is done by writing a cookie and then reading it out again. If the value is the same as what you wrote, the browser supports cookies.
If you don't feel like writing your own cookies handling script, there are many cookies libraries out there that you can use. I personally wrote two different ones in this thread
, for instance, and the rest of the CF community has contributed to among other places this thread