How to Store Cache

When a Service Worker runs for the first time, an event is fired within it; the Install event. The browser wont let […]

Read More

Cache: Open, Add & Match

Cache API If we want to be able to load the entire app without using the network, we need a […]

Read More

Dynamic Request Handling

The following are steps to handling a request for a page. If requested page doesn’t exist, 404 response. If it […]

Read More

Hijacking Requests Selectively

What is fetch(url) ? Now instead of making our SW send simple responses, let’s go to the network for the […]

Read More

Hijacking Requests

Simple Response Once the SW is in control, it can hijack requests to servers and respond with anything you want. […]

Read More

Service Worker Lifecycle

Service Worker First Load The SW only takes control of pages when they’re loaded. Naturally, if your page had loaded […]

Read More

Registering a Service Worker

index.js For our app, index.js is the SW script, and it is located in \wittr\public\js\sw\index.js. Fetch event listener A fetch event controls requests […]

Read More

Service Worker Intro

What is a Service Worker? Service Worker is simply a JavaScript file that sits between you and the network. It’s […]

Read More

The Demo App

1. Install NodeJS You’ll need Node.js v0.12.7 or above. Check what version you have if you already have it node […]

Read More

What Is Offline First?

Lie-fi It is an expression to describe a WiFi network that seems to to be available but won’t connect, or […]

Read More