Skip to content

steffstefferson/pwa-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwa-example

example of a pwa newssite

installation

run the application with the npm commands "npm install" then "npm dev" (using lite-server)

or you can simply copy the folder "app" to your favorite webserver

service worker

checkout the diffrent kind of service-workers

sw-v0.js (to use it copy the file content to sw.js) caches the app shell but not the rssfeed

sw-v1.js (to use it copy the file content to sw.js) caches the app shell and also the rssfeed, but for both a cache first strategy is applied

sw-v2.js (to use it copy the file content to sw.js) cache first strategy for app shell and network first strategy for the rssfeed

Copy the content of one of these files to app/sw.js to try out the diffrent kinds of service workers.

Note: consider using tools like sw-precache, sw-toolbox or workbox when dealing with more complex service workers.

About

example of a pwa newssite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published