Persisting cache in localstorage/idb so site can work offline
I know its possible with tanstack query to add a persister that can do this, but can this be done with starts build in route caching? the holy grail for me would be for the entire site to work offline once a simple service worker is added to cache the html/assets etc. All of the server side json would just come from the offline cache and when the connection is reestablished it would be refetched
I think I heard Tanner talk about this in a podcast months ago but not sure if anything got done or if its even possible
2 Replies
extended-salmon•7mo ago
right now we don't have a way to persist router's matches. but if you use query in your loaders, its persister might just work
did you try this?
extended-yellowOP•7mo ago
Not yet, haven’t decided on a framework to use, I’m still not sure if start is suitable since I will need most of the site to be statically generated and support incremental static generation and i18n and I haven’t yet figured out if start is going to work for that yet