Skip to content

Commit a5349aa

Browse files
committed
gotcha when deleting a cookie more explicit
1 parent 2841fd8 commit a5349aa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎README.rdoc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Delete cookie by passing null as value:
3131

3232
$.cookie('the_cookie', null);
3333

34-
Note when clearing cookies, you must pass the exact same options that were used to initially set the cookie.
34+
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie.*
3535

3636
== Options
3737

@@ -43,7 +43,7 @@ Define lifetime of the cookie. Value can be a +Number+ (which will be interprete
4343

4444
Default: path of page where the cookie was created.
4545

46-
Define the path where cookie is valid. <b>By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).</b> If you want to make it available for instance across the entire page use <code>path: '/'</code>. If you want to delete a cookie with a particular path, you need to include that path in the call.
46+
Define the path where cookie is valid. <b>By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).</b> If you want to make it available for instance across the entire page use <code>path: '/'</code>.
4747

4848
domain: 'example.com'
4949

0 commit comments

Comments
 (0)