guardian / dotcom-rendering

The Guardian web rendering service (aka DCR/DCAR)
https://www.theguardian.com
Apache License 2.0
255 stars 30 forks source link

Offline Reading in DCAR for Apps #7301

Open georgeblahblah opened 1 year ago

georgeblahblah commented 1 year ago

Offline Reading

Offline reading means readers can read articles when their device does not have a network connection, even if the article is server side rendered by Apps Rendering. DCR does not currently support offline reading.

Server side rendered articles link to assets, like javascript and webfonts, which can be fetched with a network request or from a cache on the device.

The iOS and Android apps use different mechanisms to add these linked assets to their caches:

iOS

Android

How could we support offline reading during the migration of AR into DCR?

During the migration and until AR is deprecated, apps will need to support offline reading for two platforms: AR and DCR. This adds some complexity to the current setup.

Assuming that iOS restrictions mean requests for static assets can't be intercepted at asset load time, we might need to:

OllysCoding commented 1 year ago

Taking a look at this there are two steps required still

  1. Create the built file output for DCR & discuss this with the iOS devs to see if we can dual-stack these files while both DCR & AR are running
  2. Forward the 'Link' in Frontend which DCR already sends, so that it would be received by the Andriod app