@slightlyoff js frameworks may be a mess with local state, but what about using a service worker to cache and fetch html fragments from the browser cache/indexeddb/opfs etc? Surely that's the best experience of all?
Likewise the broader umbrella of Local First web apps? https://localfirstweb.dev/