You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 280132f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
= jquery.cookie
1
+
#jquery.cookie
2
2
3
3
A simple, lightweight jQuery plugin for reading, writing and deleting cookies.
4
4
5
-
== Installation
5
+
##Installation
6
6
7
7
Include script *after* the jQuery library (unless you are packaging scripts somehow else):
8
8
9
9
<script src="/path/to/jquery.cookie.js"></script>
10
10
11
-
== Usage
11
+
##Usage
12
12
13
13
Create session cookie:
14
14
@@ -33,41 +33,41 @@ Delete cookie by passing null as value:
33
33
34
34
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie.*
35
35
36
-
== Options
36
+
##Options
37
37
38
38
expires: 365
39
39
40
-
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 is a session cookie.
40
+
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 is a session cookie.
41
41
42
42
path: '/'
43
43
44
44
Default: path of page where the cookie was created.
45
45
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>.
46
+
Define the path where cookie is valid. *By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).* If you want to make it available for instance across the entire page use `path: '/'`.
47
47
48
48
domain: 'example.com'
49
49
50
50
Default: domain of page where the cookie was created.
51
51
52
52
secure: true
53
53
54
-
Default: +false+. If true, the cookie transmission requires a secure protocol (https).
54
+
Default: `false`. If true, the cookie transmission requires a secure protocol (https).
55
55
56
56
raw: true
57
57
58
-
Default: +false+.
58
+
Default: `false`.
59
59
60
-
By default the cookie is encoded/decoded when creating/reading, using +encodeURIComponent+/+decodeURIComponent+. Turn off by setting <code>raw: true</code>.
60
+
By default the cookie is encoded/decoded when creating/reading, using `encodeURIComponent`/`decodeURIComponent`. Turn off by setting `raw: true`.
61
61
62
62
== Changelog
63
63
64
64
== Development
65
65
66
-
- Source hosted at {GitHub}[https://github.com/carhartl/jquery-cookie]
67
-
- Report issues, questions, feature requests on {GitHub Issues}[https://github.com/carhartl/jquery-cookie/issues]
66
+
- Source hosted at [GitHub](https://github.com/carhartl/jquery-cookie)
67
+
- Report issues, questions, feature requests on [GitHub Issues](https://github.com/carhartl/jquery-cookie/issues)
68
68
69
69
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
0 commit comments