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

Use local storage rather than cookies for persistence #31

Open
kingo55 opened this issue Dec 8, 2019 · 4 comments
Open

Use local storage rather than cookies for persistence #31

kingo55 opened this issue Dec 8, 2019 · 4 comments
Labels
enhancement New feature or request Priority-Low

Comments

@kingo55
Copy link
Member

kingo55 commented Dec 8, 2019

Cookies can be problematic with how much data is transmitted and processed by some web/application servers and we don't need Mojito cookies server-side.

Perhaps we should provide an option for localStorage or consider migrating all over to localStorage.

@kingo55 kingo55 added the enhancement New feature or request label Dec 8, 2019
@dapperdrop
Copy link
Member

@kingo55 would it make sense to approach it like #28? i.e. give users ability to customise persistence methods. We could make localStorage the new default and override to cookies in shared code as we migrate across?

@kingo55
Copy link
Member Author

kingo55 commented Dec 9, 2019

@dapperdrop - I think a config flag is most useful here.

Default to localStorage and have something like Mojito.options.useCookies = true; to toggle to cookies. Will be able to keep the cookie utilities functions for use in variant code then too.

@dapperdrop
Copy link
Member

@kingo55 OK cool, that makes sense to me.

@kingo55
Copy link
Member Author

kingo55 commented Dec 19, 2019

We should think about this issue some more because it will impact #40 and we'll probably need a pathway to migrate old containers from cookies to local storage.

Of course if users are getting random numbers from a user seed/hash, then it shouldn't really matter, because they will get pretty much the same recipe unless they were excluded by sample during ramp up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority-Low
Projects
None yet
Development

No branches or pull requests

2 participants