guardian / dotcom-rendering

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

[Epic]: DCR for Apps - Offline Reading #7301

Open georgeblahblah opened 1 year ago

georgeblahblah commented 1 year ago

Offline Reading

### Tasks required for the first production release
- [ ] https://github.com/guardian/dotcom-rendering/issues/8814
- [ ] https://github.com/guardian/dotcom-rendering/issues/9897
### Tasks for subsequent production releases
- [ ] https://github.com/guardian/dotcom-rendering/issues/8937
- [ ] https://github.com/guardian/dotcom-rendering/issues/8938

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