Hacker News new | ask | show | jobs
by versteegen 978 days ago
What about calling navigator.storage.persist() to prompt the user to allow persistent storage?

Wow, thanks for the warning about that itch.io problem. It's discussed here: https://itch.io/t/2636350/localstorage-doesnt-work-for-html5... and behaviour of Safari's default-on "Prevent Cross-site Tracking" here: https://stackoverflow.com/questions/63922558/safari-localsto...

So this is happening because itch.io hosts the game on a CDN subdomain such as v6p9d9t4.ssl.hwcdn.net which may change at any time? If it doesn't change, it sounds to me like there should be no problem, but I suspect I misunderstand. And sounds like it's Safari, not just iOS?

I'm about to start letting users export their games to html5, almost all of which will end up on itch.io, so really need to solve this too.

1 comments

I had never heard of navigator.storage.persist(). I will give it a try, thanks!