I'm not sure how often they're used in apps generally, much less offline-able apps hosted on GitHub Pages, but they're mentioned in Introduction to Service Worker at least, so at least some folks have spent some time thinking about how to handle them when using Service Worker to cache app assets.
Since the promise of Oghliner is to simply cache your whole app offline, I'm loathe to complicate the interface with conditional/lazy caching of assets. But perhaps it would make sense to include some support for caching one of several variants of an image.
For example, we might let users specify assets that shouldn't be cached immediately but should be cached once requested, something like:
Sometimes images are conditionally downloaded, particularly responsive images that use <img srcset> to make the browser determine which one of a set to load, as described in Responsive Images: If you’re just changing resolutions, use srcset..
I'm not sure how often they're used in apps generally, much less offline-able apps hosted on GitHub Pages, but they're mentioned in Introduction to Service Worker at least, so at least some folks have spent some time thinking about how to handle them when using Service Worker to cache app assets.
Since the promise of Oghliner is to simply cache your whole app offline, I'm loathe to complicate the interface with conditional/lazy caching of assets. But perhaps it would make sense to include some support for caching one of several variants of an image.
For example, we might let users specify assets that shouldn't be cached immediately but should be cached once requested, something like:
Then the worker can cache whichever variant the browser ends up requesting.
Before we do something like this, however, we should have better use cases for it, ideally in the field.