Live data from Hacker News

Don't rely on LocalStorage

blog.jacobweisz.com

11–20 of 71 posts

Re: Don't rely on LocalStorage

#11
> You see, the first time I tried Wordle was on my tablet. But suddenly, I wanted to give Wordle a shot on my phone... and I realized those treasured statistics wouldn't be there.

I want to take it seriously but it's hard.

Re: Don't rely on LocalStorage

#12
post #3

Regarding Wordle specifically, this allowed Josh Wardle to make the app a simple webpage with no backend necessary beyond serving the page itself. Is there something that allows someone like him to do that aside from LocalStorage?

I believe he could have used Cookies instead of LocalStorage. The data he's keeping seems simple enough. It has the same issues the author is talking about, but it should work.

Re: Don't rely on LocalStorage

#13
post #4

The author makes some decent points about localStorage generally, but I think really misses the point on what makes Wordle so successful and endearing. It was built as a side project for a very small audience and just happened to have massive, organic growth. If Josh Wardle had thought about all of these described use cases in advance, there's a much higher chance that it never would have gotten off the ground as a s…

I admit focusing on Wordle here may be a popularity hack for this article[1] (though it is also what brought writing it to mind), as obviously Josh Wardle wasn't expecting the results he got. Though I do really hope the New York Times integrates cross-device play at some point... they already have an account system, after all.

I think small audiences also benefit from a server-side component, although ideally one that is also relatively small: With the example of high scores or seeing friends' progress, I wouldn't want to see the entire world's, but maybe share amongst a small group of friends or family. (This is what sharing to Twitter or Facebook largely emulates, in a very indirect way.)

[1] Aside: I briefly wondered if I should figure a way to shoehorn "Wordle" into the title if I was actually hoping to get some traction with this article, but I really think it would've moved away from the point then.

Re: Don't rely on LocalStorage

#14
Sure you won't be able to see all of your friend's stats in one nice looking UI, but I doubt that has bothered anyone tremendously. If anything, what you perceive to be crutch actually encourages people to share their result 1-1 with their friends in whatever chat apps they please. That to me, is a feature, not a bug.

Re: Don't rely on LocalStorage

#15
post #10

Earlier quoted context omitted.

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…

Are those statistics actually interesting to many users? I barely noticed the move to NYTimes because I'm mostly just interested in playing the game once a day, sometimes sharing the result.

You can take my 100% win-loss ratio from my cold dead hands, I cherish my stats.

Re: Don't rely on LocalStorage

#16
There's definitely a real problem to be solved here. Offline persistence is by far one of the weakest parts of the web platform. It's definitely tricky to make secure, but I'd love to see more innovation in this area.

Re: Don't rely on LocalStorage

#17
post #10

Earlier quoted context omitted.

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…

Are those statistics actually interesting to many users? I barely noticed the move to NYTimes because I'm mostly just interested in playing the game once a day, sometimes sharing the result.

This might be one of those weird gamification things... but I don't think I'd care about my stats if they weren't there. But since they are, I don't want to mess them up by playing on multiple devices?

Re: Don't rely on LocalStorage

#18
I kinda got the feeling that this article was mainly written to take advantage of the Wordle hype. Overall I didn't get much of substance and I felt that the main takeaway was disingenuous to what the goals of the developer were. As if it's always wrong to use local storage. I'm sure the developer knew the limitations of using local storage. And it definitely rubbed me the wrong way when the author called it "lazy" to use local storage. Probably because I've recently gotten really into building apps that put data back in users' control and also trying to reduce the environmental impact of my apps. Local storage is really great for this, and often the apps I'm building it's totally acceptable to not have your data follow you everywhere. At the very least, that is often what I'm doing intentionally. Does that make me lazy? I don't think so. In fact, I find it challenging to architect apps this way because I"m used to the traditional client/server model, which there are way more examples of and feels like the default.

I have a hard time not seeing this as clickbait.

edit: correction thanks to a reply that corrected me about the author not having a game

Re: Don't rely on LocalStorage

#19
Seems like this article misses one critical point. Part of the wordle attraction was the friction free ability to play. Click on a link, type in a 5 letter word and you are playing. I suspect it would not have gained popularity anywhere near as quickly if step #1 was create an account.

Re: Don't rely on LocalStorage

#20
This just sounds like a Sandstorm issue/side-effect. Of course randomizing hostnames is going to break things that rely on the underpinnings of the web. I don't think a third-party tool failing to provide additional functionality beyond what the developer intended is reason to entirely dismiss core web functionality like LocalStorage.
Post reply on HN