Skip to content

Reply Labcamp example with IndexedDB, ServiceWorker and Push Notification

Notifications You must be signed in to change notification settings

TommyR22/PWA_REPLY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install

Download and use a web server like: web-server-for-chrome

or use python: python -m SimpleHTTPServer (Python 2.7) / python -m http.server --cgi 8000 (Python 3.7)

#TODO

Manifest

  • create manifest.json and add it to project.
    • you can find icons in images/icons folder.
  • link it to index.html
  • test it with Chrome DevTool.

Cache localStorage

  • create a function to save app.selectedCities in localStorage.
  • call this function in butAddCity eventListener.
  • call this function in startup code.

Service Worker

  • create a service worker file
    • handle INSTALL, ACTIVATE and FETCH event.
    • In FETCH event, use a cache pattern.
  • register it in app.js
  • (OPTIONAL) change pattern ServiceWorker
  • (OPTIONAL) push notification

Chrome bug: GoogleChromeLabs/web-push-codelab#49

IndexedDB

Change localStorage with IndexedDB

Testing

  • use Google Lighthouse

About

Reply Labcamp example with IndexedDB, ServiceWorker and Push Notification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published