
Learning Progressive Web Apps
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
"You have made an excellent decision in picking up this book. If I was just starting on my learning path to mastery of Progressive Web Apps, there are not many folks I would trust more to get me there than John."
-Simon MacDonald, Developer Advocate, Adobe Software developers have two options for the apps they build: native apps targeting a specific device or web apps that run on any device. Building native apps is challenging, especially when your app targets multiple system types-i.e., desktop computers, smartphones, televisions-because user experience varies dramatically across devices.
Service Workers-a relatively new technology-make it easier for web apps to bridge the gap between native and web capabilities. In Learning Progressive Web Apps, author John M. Wargo demonstrates how to use Service Workers to enhance the capabilities of a web app to create Progressive Web Apps (PWA). He focuses on the technologies that enable PWAs and how to use those technologies to enhance your web apps to deliver a more native-like experience.
Build web apps a user can easily install on their local system and that work offline or on low-quality networks
Utilize caching strategies that give you control over which app resources are cached and when
Deliver background processing in a web application
Implement push notifications that enable an app to easily engage with users or trigger action from a remote server
Throughout the book, Wargo introduces each core concept and illustrates the implementation of each capability through several complete, operational examples. You'll start with simple web apps, then incrementally expand and extend them with state-of-the-art features. All example source code is available on GitHub, and additional resources are available on the author's companion site, learningpwa.com.
Register your book for convenient access to downloads, updates, and/or corrections as they become available. See inside book for details.
All prices
More details
Other editions
Additional editions

Person
Content
Preface xii
Acknowledgments xv
About the Author xvi
Chapter 1: Introducing Progressive Web Apps 1
First, a Little Bit of History 2
PWAs Are . . . 2
Making a Progressive Web App 4
PWA Market Impact 6
PWAs and App Stores 7
Wrap-Up 7
Chapter 2: Web App Manifest Files 9
Save to Home Screen 11
Making a Web App Installable 16
Anatomy of a Web App Manifest 17
Controlling the Installation Experience 26
Preparing to Code 27
App Installation in Action 29
Troubleshooting 41
Manifest Generation and More 42
Wrap-Up 42
Chapter 3: Service Workers 43
PWA News 43
Introducing Service Workers 44
Preparing to Code 46
Registering a Service Worker 52
Service Worker Scope 60
The Service Worker Lifecycle 60
Wrap-Up 66
Chapter 4: Resource Caching 67
Service Worker Cache Interface 67
Preparing to Code 69
Caching Application Resources 70
Implementing Additional Caching Strategies 91
Wrap-Up 98
Chapter 5: Going the Rest of the Way Offline with Background Sync 99
Introducing Background Sync 100
Offline Data Sync 103
Choosing a Sync Database 105
Preparing to Code 110
Enhancing the PWA News Application 111
Wrap-Up 128
Chapter 6: Push Notifications 129
Introducing Push Notifications 129
Remote Notification Architecture 132
Preparing to Code 134
Generating Encryption Keys 134
Validating Notification Support 138
Checking Notification Permission 138
Getting Permission for Notifications 139
Local Notifications 142
Notification Options 144
Subscribing to Notifications 148
Unsubscribing from Notifications 154
Remote Notifications 156
Dealing with Subscription Expiration 162
Sending Notifications to Push Services 162
Wrap-Up 164
Chapter 7: Passing Data between Service Workers and Web Applications 165
Preparing to Code 166
Send Data from a Web App to a Service Worker 167
Send Data from a Service Worker to a Web App 169
Two-Way Communication Using MessageChannel 171
Wrap-Up 180
Chapter 8: Assessment, Automation, and Deployment 181
Assessing PWA Quality Using Lighthouse 181
Preparing to Code 182
PWABuilder 190
PWAs and the Microsoft Store 202
Wrap-Up 205
Chapter 9: Automating Service Workers with Google Workbox 207
Introducing Workbox 207
Generating a Precaching Service Worker 208
Add Precaching to an Existing Service Worker 215
Controlling Cache Strategies 218
Wrap-Up 224
Index 225
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.
File format: PDF
Copy protection: Watermark-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use the free software Adobe Reader, Adobe Digital Editions, or any other PDF viewer of your choice (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or another reading app for eBooks, e.g., PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Watermark-DRM, a „soft” copy protection. This means that there are no technical restrictions to prevent illegal distribution. However, there is a personalised watermark embedded in the eBook that can be used to identify the purchaser of the eBook in the event of misuse and to provide evidence for legal purposes.
For more information, see our eBook Help page.