What's the Service Worker for? It doesn't appear to do anything.
The skeleton provided by ChatGPT to get the page to load fullscreen as a PWA included it, so I just kept it. “Maybe in future”... But it’s unnecessary, I should have removed it.
Show HN: Fall asleep by watching JavaScript load
31–36 of 36 posts
Re: Show HN: Fall asleep by watching JavaScript load
#32I can’t think of a more terrible way to fall asleep.
I know right. It is not only counterintuitive, but psychologically incoherent as to how sleep initiation actually works. A loading screen is psychologically linked to anticipatory arousal and goal-oriented expectancy, which activates the sympathetic nervous system. That is the opposite of what sleep requires, which depends on parasympathetic dominance and cognitive disengagement. Using a "loader" for falling asleep p…
It does not replace healthy bedtime routines of course, and it never meant to be a serious sleeping aid, but more of an experiment - and partially a joke. Maybe the premise should have been to help stop a spinning mind rather than to fall asleep...
Re: Show HN: Fall asleep by watching JavaScript load
#33This is unreasonably effective, and I'm not entirely sure why Thank you so much, an instant 'Add to Home Screen' from me
Re: Show HN: Fall asleep by watching JavaScript load
#34This is unreasonably effective, and I'm not entirely sure why Thank you so much, an instant 'Add to Home Screen' from me
Happy to hear! It doesn't replace healthy bedtime routines of course, and it's halfway between an experiment and a joke, but still... :)
Re: Show HN: Fall asleep by watching JavaScript load
#35I presume there's no actual loading happening, it's just a timer. Real loading spinners aren't fun, but fake ones are next level bad. Not sure why anyone would deliberately put themselves through this experience.
To fall asleep, presumably