JulianNorton / weather-10kb-wxkb

Weather forecast that's high performance and accessible
https://wxkb.juliannorton.com
GNU General Public License v2.0
152 stars 49 forks source link

Implement service worker for offline caching #155

Closed JulianNorton closed 7 years ago

JulianNorton commented 7 years ago

What's the current situation?

Currently if the site tries to refresh without an internet connection, the page data is lost and it shows a default error page.

It means that if cached previously your website can be available to the user who has no Internet connection or if your server went down. You can also serve the cached documents and/or assets even if there are no technical issues and that results in much faster website load times.

What do you recommend?

https://labs.kollegorna.se/blog/2017/06/service-worker-gotchas/#registering-a-service-worker

Recommend register a service worker.

techpool commented 7 years ago

Hey, I would like to take this up and implement service worker with the current library. Can someone please give me a basic understanding about where I should start and how to move forward?

JulianNorton commented 7 years ago

@techpool Thank you for offering! I recommend this google tutorial: https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0

Is this what you were looking for?

JulianNorton commented 7 years ago

closed by @fers490 👍