Questions about this topic? Sign up to ask in the talk tab.

Cookies/Deleting A Cookie

From NetSec
Revision as of 07:36, 19 July 2012 by Chantal21I (Talk | contribs) (Created page with "== Direct HTTP programming == {{:Cookies/Deleting_A_Cookie/Direct_HTTP_Programming}} == PHP == {{:Cookies/Deleting_A_Cookie/PHP}} == JavaScript == {{:Cookies/Deleting_A_Cookie/...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Direct HTTP programming

To delete a cookie, simply set it with an Expires date in the past and optionally with an empty value. It will be erased.

PHP

The same goes with PHP. Set the value of the cookie to false using setcookie

JavaScript

Set the cookie as described above with an empty value, and an expiry date in the past.