ts-service-worker 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ export const plan: Plan =
|
|
|
51
51
|
Here, we see multiple strategies in action. Each request is evaluated (sequentially) against the paths, and the first matching strategy is applied. (If not strategy matches, the resource is fetched as normal.)
|
|
52
52
|
- The path `open-search.xml` will never be cached,
|
|
53
53
|
- `/my-data.json` will be served from the cache and re-fetched in the background, available for a later access.
|
|
54
|
-
- Finally, the file `/networkDown.html` will be cached, and served as a replacement for other HTML pages when
|
|
54
|
+
- Finally, the file `/networkDown.html` will be cached, and served as a replacement for other HTML pages when fetching fails.
|
|
55
55
|
|
|
56
56
|
Another common strategy is to pre-cache some resources on disk. These can be explicitly listed, or dynamically determined from glob matches of files on disk:
|
|
57
57
|
```ts
|
|
@@ -191,7 +191,7 @@ Unfortunately, the service worker API is also hard to use, as it is quite low-le
|
|
|
191
191
|
|
|
192
192
|
And since service workers run in the browser, they must be written in the browser's version Javascript. This likely involves transpilation, which will requiring additional complexity in the build process to produce a separate artifact. It can be quite challenging in a Typescript project.
|
|
193
193
|
|
|
194
|
-
There are
|
|
194
|
+
There are [other libraries](#other-libraries) designed to help, which may be useful to you. **TS-Service-Worker** aims to solve specific challenges.
|
|
195
195
|
|
|
196
196
|
## TODO
|
|
197
197
|
2. https://web.dev/learn/pwa/serving/#cache-only
|