Skip to content
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

Array #2

Open
wm-simon opened this issue Sep 28, 2019 · 1 comment
Open

Array #2

wm-simon opened this issue Sep 28, 2019 · 1 comment

Comments

@wm-simon
Copy link

Hi, thanks for your addon. Is there away to save an array in the cookie? I want to save the ids of some visited sites.

@aryehraber
Copy link
Contributor

Hi @Pfeifakopf! Browser cookies need to be stored as strings, so if you need an array, it would need to be json encoded/decoded when storing/retrieving the cookie.

Would be happy to review and merge a PR if you're able & willing to add this feature.

Side note: I don't think it would currently be possible/easy to append new IDs to an existing cookie (assuming you want to push an ID after each page visit). To be completely honest, this would probably be better suited for a custom Addon/Helper Tag, or to handle via JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants