https://github.com/websemantics/service-workers
A simple implementation of off-line content cache based on service workers,
https://github.com/websemantics/service-workers
Last synced: 2 months ago
JSON representation
A simple implementation of off-line content cache based on service workers,
- Host: GitHub
- URL: https://github.com/websemantics/service-workers
- Owner: websemantics
- Created: 2016-08-24T17:58:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-24T20:21:54.000Z (over 9 years ago)
- Last Synced: 2024-12-26T08:42:35.945Z (12 months ago)
- Language: HTML
- Homepage: https://websemantics.github.io/service-workers/
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
___
_ _ ( _`\ _
( \_/ ) | (_(_) __ _ __ _ _ (_) ___ __
__) _ (__ `\__ \ /'__`\( '__)( ) ( )| | /'___) /'__`\ _ _
(__ (_) __) ( )_) |( ___/| | | \_/ || |( (___ ( ___/ ( \_/ )
) _ ( `\____)`\____)(_) `\___/'(_)`\____)`\____) _ _ __) _ (__
(_/ \_) _ _ ( \_/ ) _ (__ (_) __)
_ _ _ _ ( \_/ )__) _ (__( \_/ )) _ (
( ) ( ) ( ) _ _ __ ( )/') __ _ __ ___ __) _ ((__ (_) __)) _ ((_/ \_)
| | | | | | /'_`\ ( '__)| , < /'__`\( '__)/',__) (__ (_) __)) _ ((__ (_) __)
| (_/ \_) |( (_) )| | | |\`\ ( ___/| | \__, \ ) _ ( (_/ \_) ) _ (
`\___x___/'`\___/'(_) (_) (_)`\____)(_) (____/ (_/ \_) (_/ \_)
```
> A simple implementation of off-line content cache based on service workers,
### [Demo](https://websemantics.github.io/service-workers/) [Getting Started](#getting-started) [Submit Issue](https://github.com/websemantics/service-workers/issues)
## Getting Started
A great introduction to *Service Workers* can be found in the [References](#references) sections.
There are three events that need to be handled,
- Install,
- Activate, and
- Fetch.
The *install* event is fired once, *activate* after *instal* and every time a pgage from the registered domain is loaded (but not between pages from the same domain), and *fetch*, every time a page is requested.
**WORK IN PROGRESS**
## References
[Article](https://madebymike.com.au//writing/service-workers/?utm_source=codropscollective), Offline content with service workers.
[The Service Worker](https://jakearchibald.com/2014/offline-cookbook/), The offline cookbook.