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
Provide more information regarding on how the "domain" attribute works
according to the RFC 6265 and the actual behavior of major browsers.
Closesjs-cookiegh-87. Closesjs-cookiegh-91. Related to js-cookiegh-81.
Copy file name to clipboardExpand all lines: README.md
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -175,17 +175,29 @@ This means one cannot set a path using `path: window.location.pathname` in case
175
175
176
176
### domain
177
177
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.
178
+
A [`String`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) indicating a valid domain where the cookie should be visible. The cookie will also be visible to all subdomains.
179
179
180
-
**Default:**Domain of the page where the cookie was created.
180
+
**Default:**Cookie is visible only to the domain or subdomain of the page where the cookie was created, except for Internet Explorer (see below).
181
181
182
182
**Examples:**
183
183
184
+
Assuming a cookie that is being created on `site.com`:
0 commit comments