What is this?
Since this blog is just a static website, it should be easy for it to be fully readable even with no internet connection. After all, only approximately 0% of the population of this planet have access to cheap, reliable, fast, always-active internet connection. This has always been possible by cloning the git repository and running an HTTP server locally, but that hardly qualifies as easy.
If you want to be able to read this blog while offline, because, for instance, you have access to fast internet only sporadically, then this feature is something made for you.
Naturally, this feature requires storing the cached pages on your device. None of it ever leaves your device, it is only used locally by the service worker running locally in the browser, unless an undocumented "feature" of the browser causes it to be sent somewhere for some reason? For that, I can only recommend avoiding proprietary software and other forms of malware.
How do I use it?
Just enable it. After enabling, all visited pages from now on will be saved into the offline mode cache for later viewing. Requests for saved pages will be served from the cache if no network connection is present, if a server error occurs or if the network takes too long.
If connected to a slow or intermittent network, requests are still made, in hope of acquiring the up-to-date version of the page. Even if the network ends up being too slow and the cached version is served, the request continues running in the background so that the cache can be updated with the up-to-date version of the page once it finishes.
The "update all pages" button simply downloads the current versions of all pages on the site and stores them in the cache, which is very handy for allowing all contents of the site to be viewed offline.
The "clear offline mode cache" button removes all pages stored by this site in the cache storage. This is roughly equivalent to removing all stored data for this site in browser settings.
Note that all network requests performed by the offline mode service worker are still subject to the browser's own cache: the browser can simply return cached data for a "network" request, without ever involving the network proper, and it can ask the server if its cached version is still current, for example using the
If-Modified-Since header. The amount of data transferred should therefore be similar whether the offline mode is enabled or not.