Vely logo install

Vely 15.2.0 released on Jan 18, 2023
Articles updated Jan 17, 2023


Issues with this documentation page? Report here.


Deletes a cookie.


delete-cookie <cookie name> [ path <cookie path> ] [ status [ define ] <status> ]


delete-cookie marks a cookie named <cookie name> for deletion, so it is sent back in the reply telling the client (such as browser) to delete it.

<cookie name> is a cookie that was either received from the client as a part of the request, or was added with set-cookie.

A cookie can be deleted before or after sending out a header (see out-header). However a cookie must be deleted prior to outputting any actual response (such as with output_statement or p-out for example), or the program will error out and stop.

<status> is the integer variable (which can be created with "define" if it does not exist) that will be -1 if the cookie did not exist, or 0 or greater if it did.

The same cookie name may be stored under different URL paths. You can use the optional "path" clause to specify <cookie path> to ensure the desired cookie is deleted.


delete-cookie "my_cookie"
delete-cookie "my_cookie" path "/path"

See also:

Cookies ( delete-cookie   get-cookie   set-cookie  )  SEE ALL (documentation)

Copyright (c) 2022 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Vely elephant logo (c) 2022 DaSoftver LLC. This web page is licensed under CC-BY-SA-4.0.