JavaScript in the Background
What happens with your JavaScript code when the user presses the home button, minimizes the window, or replies to a WhatsApp message while using your web app? Let’s uncover the secrets of JavaScript in the background and how to wake it up for later execution.
We’ll cover the power that our web apps can use today with different APIs, such as Periodic Background Sync, Web Push, and how to use Clients API within a Service Worker in terms of detection, waking up the process, and notifying the user while in the background.
You will see with hands-on coding, how to save battery, how to deal with timer-based tasks and animations, how to sync data when the app is not active, how to wake up your code from the server, and how to announce to our server or service worker that our context might disappear.