Post

Under 100kb for a streaming offline-first Mastodon client is wild. Curious how you handled the ServiceWorker cache invalidation for the streaming timeline data without it getting stale or bloated over time.

It's all done via the Cache API instead of letting the SW cache network requests on its own. That's the neat part - it uses the Cache API as a database for network requests. It even mutates previously-cached requests to update them when realtime data comes in.

0 reposts1 like

No replies yet.