Skip to content

Commit e60f7e8

Browse files
committed
some more documentation tweaking
1 parent b1a53bc commit e60f7e8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@ Create expiring cookie, 7 days from then:
1818

1919
$.cookie('the_cookie', 'the_value', { expires: 7 });
2020

21-
Create expiring cookie, valid across entire page:
21+
Create expiring cookie, valid across entire site:
2222

2323
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });
2424

2525
Read cookie:
2626

27-
$.cookie('the_cookie'); // => 'the_value'
28-
$.cookie('the_cookie', {raw: true}); // => 'the_value' NOT URL decoded
27+
$.cookie('the_cookie'); // => "the_value"
28+
$.cookie('the_cookie', { raw: true }); // => "the_value" not URL decoded
2929
$.cookie('not_existing'); // => null
3030

3131
Delete cookie by passing null as value:
3232

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

35-
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie.*
35+
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie, unless you're relying on the default options that is.*
3636

3737
## Options
3838

3939
Options can be set globally by setting properties of the `$.cookie.defaults` object or individually for each call to `$.cookie()` by passing a plain object to the options argument. Per-call options override the ones set by `$.cookie.defaults`.
4040

4141
expires: 365
4242

43-
Define lifetime of the cookie. Value can be a `Number` (which will be interpreted as days from time of creation) or a `Date` object. If omitted, the cookie becomes a session cookie.
43+
Define lifetime of the cookie. Value can be a `Number` which will be interpreted as days from time of creation or a `Date` object. If omitted, the cookie becomes a session cookie.
4444

4545
path: '/'
4646

@@ -56,7 +56,7 @@ If true, the cookie transmission requires a secure protocol (https). Default: `f
5656

5757
raw: true
5858

59-
By default the cookie is encoded/decoded when creating/reading, using `encodeURIComponent`/`decodeURIComponent`. Turn off by setting `raw: true`. Default: `false`.
59+
By default the cookie value is encoded/decoded when creating/reading, using `encodeURIComponent`/`decodeURIComponent`. Turn off by setting `raw: true`. Default: `false`.
6060

6161
## Changelog
6262

0 commit comments

Comments
 (0)