Skip to content

Commit

Permalink
docs: alternative cookie delete (#6331)
Browse files Browse the repository at this point in the history
Co-authored-by: PatrickJS <github@patrickjs.com>
  • Loading branch information
Twiggeh and PatrickJS committed May 17, 2024
1 parent a2f3739 commit 53fe36d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Appends a header with the provided key to the cookie. The new header will have a
cookie.delete('my-cookie');
// equivalent to
cookie.set('my-cookie', 'deleted', new Date(0));
// or
cookie.set('my-cookie', '');
```

Optionally, you can set the path, sameSite and/or domain when deleting the cookie. If your cookie was created with a path/domain, you must set these fields for the deletion to take effect.
Expand Down

0 comments on commit 53fe36d

Please sign in to comment.