Confirmed users
51
edits
m (→Data Sync) |
m (→Service Worker) |
||
Line 54: | Line 54: | ||
Each application has its own Service Worker. | Each application has its own Service Worker. | ||
Individual Service Worker, usually offers one store for caching the application resources. In this proposal it is often | Individual Service Worker, usually offers one store for caching the application resources. In this proposal it is often referred to as the '''Offline Store'''. | ||
But a Service Worker can have an indefinite numbers of stores. The current proposal is to leverage this capability to add 2 new stores. More can be added in the future if needed. | But a Service Worker can have an indefinite numbers of stores. The current proposal is to leverage this capability to add 2 new stores. More can be added in the future if needed. | ||
Line 72: | Line 72: | ||
Render store -> Custom store -> Offline store | Render store -> Custom store -> Offline store | ||
So when an application fetch a resource (js, css, html, images, locales, etc...), it | So when an application fetch a resource (js, css, html, images, locales, etc...), it iterates over stores to see if there is a match, or falls back on the network. | ||
fetch -> Render store -> Custom store -> Offline store -> Network | fetch -> Render store -> Custom store -> Offline store -> Network | ||