Skip to content

Allow undocumented attributes to be passed when creating a cookie #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from

Conversation

FagnerMartinsBrack
Copy link
Member

This is not a green light to support all custom attributes. js-cookie only supports and documents attributes described in the public API documentation because they are usually known to work in most browsers. Anything different than that should be considered unsafe.

Feel free to propose a Pull Request and open a discussion to document a new attribute. However, keep in mind that, for the sake of trust, we will only document attributes that most browsers implement (or make it clear otherwise).

The motivation for this was the several reports regarding the SameSite attribute.

See #276, #275 and #264 for some context.

The authorship of this goes to @kukulich for his effort, as declared in this comment. Thanks!

kukulich and others added 9 commits December 10, 2016 02:22
This also creates a reference in the related test
to the specific issue we're handling here.

It also workarounds QUnit's parameter trap by creating
the 'actual' and 'expected' variables according to the
current standard throughout the test file
This work had a lot of changes and the latest one managed to put it down to 901 bytes gzipped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants