Skip to content

Commit

Permalink
Merge pull request #40 from vizeat/feat/maxAge-on-remove-cookie
Browse files Browse the repository at this point in the history
Override maxAge like expires to force cookie removal
  • Loading branch information
eXon authored Nov 27, 2016
2 parents 11e2bbb + da6c109 commit 6209499
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function remove(name, opt) {

if (typeof document !== 'undefined') {
opt.expires = new Date(1970, 1, 1, 0, 0, 1);
opt.maxAge = 0;
document.cookie = cookie.serialize(name, '', opt);
}

Expand Down

0 comments on commit 6209499

Please sign in to comment.