Skip to content

Commit

Permalink
Correct the description of the default "path" value (#29558)
Browse files Browse the repository at this point in the history
Used the wording of https://www.rfc-editor.org/rfc/rfc6265#section-4.1.2.4

The old wording makes it seem like the default value could be the whole path of the current page, although it actually is the "directory" containing the document.
  • Loading branch information
JanisE authored Jan 19, 2024
1 parent caf689d commit be67744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/document/cookie/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ In the code above, `newCookie` is a string of form `key=value`, specifying the c
- `;partitioned`: Indicates that the cookie should be stored using partitioned storage. See [Cookies Having Independent Partitioned State (CHIPS)](/en-US/docs/Web/Privacy/Partitioned_cookies) for more details.

- `;path=path`: Indicates the path that must exist in the requested URL for the browser to send the {{httpheader("Cookie")}} header (e.g., '`/`',
'`/mydir`'). If not specified, it defaults to the current path of the current document location.
'`/mydir`'). If not specified, it defaults to the "directory" of the current document URI's path component.

- `;samesite`: [SameSite](/en-US/docs/Web/HTTP/Cookies#samesite_cookies) prevents the browser from sending this cookie along with cross-site
requests. Possible values are `lax`, `strict` or `none`.
Expand Down

0 comments on commit be67744

Please sign in to comment.