Skip to content

Commit

Permalink
Enhance note in readme related to cookie deletion
Browse files Browse the repository at this point in the history
Ref: #846
  • Loading branch information
carhartl committed Dec 25, 2023
1 parent 5eeb835 commit 323f1f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -95,10 +95,10 @@ Cookies.remove('name') // fail!
Cookies.remove('name', { path: '' }) // removed!
```

_IMPORTANT! When deleting a cookie and you're not relying on the [default attributes](#cookie-attributes), you must pass the exact same path and domain attributes that were used to set the cookie:_
_IMPORTANT! When deleting a cookie and you're not relying on the [default attributes](#cookie-attributes), you must pass the exact same `path`, `domain`, `secure` and `sameSite` attributes that were used to set the cookie:_

```javascript
Cookies.remove('name', { path: '', domain: '.yourdomain.com' })
Cookies.remove('name', { path: '', domain: '.yourdomain.com', secure: true })
```

_Note: Removing a nonexistent cookie neither raises any exception nor returns any value._
Expand Down

0 comments on commit 323f1f2

Please sign in to comment.