My only gripe is: any time you click away from the tab, when you click back to it it resets the screen (shuffles the pile and clears any letters you had placed)
My only gripe is: any time you click away from the tab, when you click back to it it resets the screen (shuffles the pile and clears any letters you had placed)
The reason it was there is some days I opened the tab on my iphone and for some reason it still showed the yesterdays result rather than the new day's letters.
Will have a think of a better way to force the refresh of the letters on a new day.
This'll be the Cache-Control header interacting with tab resume: rather than setting that to expire after X time has elapsed, set it to expire at time=T, and the browser will¹ fetch the new page instead. You'd increase the effectiveness of this technique (and reduce your bandwidth requirements for repeat players) if you made `/daily` a static page, and factored out those JavaScript variables into a separate file, fetched with `fetch` or `XMLHttpRequest` (or even a `<script>` tag, like `wordlist.js` is).
If I've configured my browser to behave otherwise (e.g. it takes me longer than a day to solve each puzzle), I really don't want it overriding that and resetting on me: that would make me very sad.
¹: usually. Firefox Session Restore behaves differently – but that's expected behaviour. Every website ever behaves like that: it's what I expect, because I expect to be able to close my browser and open it again and still have more-or-less the same pages available. After all, I've got a refresh button, but no un-refresh button.