Don't rely on LocalStorage
blog.jacobweisz.com
Don't rely on LocalStorage
1–10 of 71 posts
Re: Don't rely on LocalStorage
#2Re: Don't rely on LocalStorage
#3Re: Don't rely on LocalStorage
#4Re: Don't rely on LocalStorage
#5Re: Don't rely on LocalStorage
#6Re: Don't rely on LocalStorage
#7How can they migrate it to server without requiring login? The best part is that you don't need to create any user for playing. Accessing data between devices requires some form of auth.
Re: Don't rely on LocalStorage
#8How can they migrate it to server without requiring login? The best part is that you don't need to create any user for playing. Accessing data between devices requires some form of auth.
Social OAuth and passwordless email login (essentially one-time codes) are both pretty low-effort ways of managing auth without storing a lot of sensitive data or having to manage passwords.
Re: Don't rely on LocalStorage
#9No... localStorage is popular because it allows you to persist state without requiring a server, opening up a whole lot of use cases that would normally require a login. With the tradeoff that you can't easily sync between machines and it can be cleared readily.
Calling it "lazy" seems bit unnecessarily confrontational. Of all the times I have used localStorage on my apps I can't say the reason was even once "laziness."
With that said, it would be nice to keep stats across instances on multiple devices. It adds either a lot of complicated edge cases or a lot of server calls (or both), though and it would need login or some other way to tell the server that Device A and Device B are the same person.
You also lose offline play.
A Progressive Web App would be nice. The best of both worlds. But guess what PWAs often use... localStorage, which I guess is lazy ;)
But I for one think an app that doesn't constantly send my every move to the server is actually a breath of fresh air.
Edit: fixed typo
Re: Don't rely on LocalStorage
#10How can they migrate it to server without requiring login? The best part is that you don't need to create any user for playing. Accessing data between devices requires some form of auth.
I would assume almost all daily users of Wordle would consider having to have an account in exchange for persistent, cross-device statistics a worthy trade-off. And presumably a well-designed app could even abuse LocalStorage for anonymous play, and include a mechanism to hand off and save your data, should you wish to, via a login. Social OAuth and passwordless email login (essentially one-time codes) are both prett…