(no title)
dinosaurdynasty | 8 months ago
Cache-control immutable the code and assets of the app and it will only be reloaded on changes. Offline-first and/or stale-while-revalidate approaches (as in the React swr library) can hugely help with interactivity while (as quickly as possible) updating in the background things that have changed and can be synced. (A service worker can even update the app in the background so it's usable while being updated.) HTTP3/QUIC solves the "many small requests" and especially the "head of line blocking" problems of earlier protocols (though only good app/API design can prevent waterfalls). The client can automatically redo bad connections/requests as needed. Once the app is loaded (you can still use code splitting), the API requests will be much smaller than redownloading the page over and over again
Of course this requires a lot of effort in non-trivial cases, and most don't even know how to do it/that it is possible to do.
theandrewbailey|8 months ago
I'd like to introduce you to tight mode:
https://www.smashingmagazine.com/2025/01/tight-mode-why-brow...