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
This commit is a follow-up of the discussion at js-cookiegh-54 with a few improvements.
* Clarify the values that are allowed in the cookie attributes.
* Change "cookie available" wording to "cookie visible" to make it clear what it means
@@ -139,7 +139,7 @@ Cookie attributes defaults can be set globally by setting properties of the `Coo
139
139
140
140
### expires
141
141
142
-
Define when the cookie will be removed. Value can be a `Number` which will be interpreted as days from time of creation or a `Date` instance. If omitted, the cookie becomes a session cookie.
142
+
Define when the cookie will be removed. Value can be a [`Number`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) which will be interpreted as days from time of creation or a [`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) instance. If omitted, the cookie becomes a session cookie.
143
143
144
144
**Default:** Cookie is removed when the user closes the browser.
145
145
@@ -153,7 +153,7 @@ Cookies.remove('name');
153
153
154
154
### path
155
155
156
-
Define the path where the cookie is available.
156
+
A [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) indicating the path where the cookie is visible.
157
157
158
158
**Default:**`/`
159
159
@@ -175,9 +175,9 @@ This means one cannot set a path using `path: window.location.pathname` in case
175
175
176
176
### domain
177
177
178
-
Define the domain where the cookie is available
178
+
A [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) indicating a valid domain where the cookie is visible.
179
179
180
-
**Default:** Domain of the page where the cookie was created
180
+
**Default:** Domain of the page where the cookie was created.
181
181
182
182
**Examples:**
183
183
@@ -188,9 +188,9 @@ Cookies.get('name'); // => undefined (need to read at 'sub.domain.com')
188
188
189
189
### secure
190
190
191
-
A `Boolean`indicating if the cookie transmission requires a secure protocol (https)
191
+
Either `true` or `false`, indicating if the cookie transmission requires a secure protocol (https).
0 commit comments