4 ms·
It's nice! 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
by anentropic 4y ago
It's nice!
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)
- danieltait 4y agoHmm yes ok I just removed the refresh now. 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.
- robertlagrant 4y agosetTimeout() with a timeout calculated to fire after midnight?
- jfindley 4y agoThis is still happening btw - if I quickly switch to another tab it resets the board completely, giving me a different puzzle in practice mode. This makes it sadly unusable for me.
- danieltait 4y agoSorry! I had only changed for the daily. Removed from practice and play now as well
- wizzwizz4 4y ago> 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. 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.