Book Image

Service Worker Development Cookbook

By : Sean Amarasinghe
Book Image

Service Worker Development Cookbook

By: Sean Amarasinghe

Overview of this book

It would be nice to have web apps that work offline and send push notifications. This is now possible with Service Workers, which can add native-like functionality to your web apps without requiring a download. This book will get your mobile and web apps functioning without Internet connectivity, improve performance and network interaction in order to increase the level of availability, and show you how to build performant applications that seamlessly integrate with third-party APIs. We’ll show you how to add Service Worker functionality to web apps and sites, access offline content through basic and advanced techniques, and build powerful interactive system notifications. We’ll also teach you about cache functionality and assets to provide immediate load even over narrow connections. We conclude by giving you various tips to improve app performance, including the background sync technique. By the end of this book, you’ll know build high performing and faster web and mobile applications with Service Workers.
Table of Contents (17 chapters)
Service Worker Development Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Introduction


You don't need network access for your laptop or smartphone to be useful. Especially in areas where mobile data is expensive, with some proper planning, you can download certain apps that you can sync via free Wi-Fi, and then use them offline elsewhere.

Mobile apps such as Google Maps, FeedMe, and Wikipedia give us offline apps, which can be used anywhere regardless of the Internet. Making our own app offline-compatible is a great way of winning the hearts of our clients.

Let's start this chapter by looking at how to cache critical resources for use offline.