[dancer-users] how to delete cookie

Andrew Beverley andy at andybev.com
Thu Jul 20 14:45:17 BST 2017

On Thu, 20 Jul 2017 13:24:58 +0000 Wanjuan Yang wrote:
> I got a cookie from user’s request and retrieve the data and
> store in session, then I will need to delete it in client’ browser.
> How can I delete the cookie?

Just set the expiry to a negative value:

  cookie my_cookie => '', expires => '-1d';

More information about the dancer-users mailing list