封面
版权页
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks discount offers and more
Preface
What this book covers
What you need for this book
Conventions
Reader feedback
Customer support
Chapter 1. Learning Service Worker Basics
Introduction
Setting up service workers
Setting up SSL for Windows
Setting up SSL for Mac
Setting up GitHub pages for SSL
Registering a service worker
Registering a service worker in detail
Debugging
Providing a stale version on error
Creating mock responses
Handling request timeouts
Chapter 2. Working with Resource Files
Introduction
Displaying a custom offline page
Loading images offline
Loading CSS offline
Loading fonts offline
Implementing multiple fetch handlers
Fetching remote resources
Chapter 3. Accessing Offline Content
Introduction
Caching critical resources for offline use
Showing cached content first
Implementing a cache and network race
Using window.caches
Implementing stale-while-revalidate
Chapter 4. Accessing Offline Content with Advanced Techniques
Introduction
Templating
Implementing read-through caching
Allowing offline Google Analytics
Allowing offline user interaction
Implementing selective caching
Chapter 5. Reaching Beyond the Offline Cache
Introduction
Getting network responses offline
Caching content from ZIP
Selecting the best content provider (load balancer)
Redirecting a request
Setting request headers
Making a service worker act like a remote server
Making a service worker act as a dependency injector
Forcing immediate control
Implementing fallback responses
Deferring offline requests
Chapter 6. Working with Advanced Libraries
Introduction
Working with global APIs
Implementing a circuit breaker
Implementing a dead letter queue
Logging API analytics
Working with Google Analytics
Chapter 7. Fetching Resources
Introduction
Fetching remote resources
Fetching with FetchEvent
Fetching a JSON file during service worker installation
Proxying
Prefetching
Chapter 8. Experimenting with Web Push
Introduction
Implementing a simple push notification
Showing rich notifications
Using the notification tag
Implementing push clients
Subscribing to push notifications
Managing push notification quotas
Chapter 9. Looking at General Usage
Introduction
Taking immediate control of the page
Working with slow responses
Relaying messages
Using a service worker as a proxy middleware
Using a service worker with a live flowchart
Chapter 10. Improving Performance
Introduction
Performing network requests from a cache
Performing network requests from a network
Testing waitUntil
Implementing background sync
Sending forward requests
Avoiding model fetching and render times
Index
更新时间:2021-07-14 10:05:44