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
Perhaps we should mention in the "domain" attribute section of the README more details on how the sub-domain syntax works according to the spec. See #81.
The text was updated successfully, but these errors were encountered:
Could be a good idea. Few programmers are going to read an RFC. js-cookie is in a position of trust to present us a distilled version of cookie behavior!
I believe changing the docs by including "subdomain" instead of "domain" fixes most confusion about the domain attribute:
A String indicating a valid subdomain where the cookie is visible.
A domain doesn't make sense (the domain cannot be changed), so it makes sense documenting that it accepts only a subdomain of the current domain. I believe this is an interpretation confusion, where the docs assumes that a subdomain is also a domain.
It can be more specific like:
A String indicating a valid subdomain where the cookie is visible. For security reasons, only subdomains of the current page are allowed.
Perhaps we should mention in the "domain" attribute section of the README more details on how the sub-domain syntax works according to the spec. See #81.
The text was updated successfully, but these errors were encountered: