[gatsby-plugin-offline] Support for Content Indexing API #20485
Unanswered
jeffposnick
asked this question in
Ideas / Feature Requests
Replies: 2 comments
-
What do you require assistance with in the integration? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@jeffposnick this is very interesting! Since it's an experimental feature undergoing trial origin, I think we should hold off on this for a bit. It's quite a bit of work for our team to maintain the burden of checking if something moves to stable or gets deprecated. This would be a good use of the #14636 which we are starting to reconsider. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
The Content Indexing API is an experimental web platform feature, currently undergoing an Origin Trial in Chrome 80+.
Developers who already ship offline-capable web apps can use this API to tell the local browser about URLs which will work offline, and then the browser can choose to surface those URLs, potentially with high prominence, when it detects that there's no Internet connection available.
Since using
gatsby-plugin-offline
means that your web app already has good offline support, adding in calls to the Content Indexing API (either as part of the plugin, or as a separate, standalone plugin) should be a straightforward integration.Basic example
The specifics of the integration would depend on how
gatsby-plugin-offline
keeps track of its offline content (which I'm not 100% up to date on), but here are a few examples of code changes needed to enable the Content Indexing API in other web apps:Motivation
If a developer has gone through the trouble of making their content available offline, shouldn't users of their web app be told about that content when they're most likely to appreciate that effort?
Beta Was this translation helpful? Give feedback.
All reactions