normally for offline, you use a service worker. see:
https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
service workers also have access to indexDB (which in current browsers is implemented with SQLite)
https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
these two technologies are generally combined to create a PWA.
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
note: if you are interested in Blazor, only Blazor WSAM can work offline. You can build a PWA with Blazor, but the service worker must still be written in javascript. A WASM can not directly access indexDB (same as it can not access dom, ajax or fileapi) but can call host. Blazor does this by an interop library.