Skip to content

Instantly share code, notes, and snippets.

View HalitTalha's full-sized avatar

Halit Talha TÜRE HalitTalha

View GitHub Profile
@HalitTalha
HalitTalha / sw.js
Last active August 2, 2019 13:16
Service Worker Code for simply caching static contents like html, css, js and assets.
const PRECACHE = 'myapplication-v1';
const RUNTIME = 'runtime';
const CONTEXT = '/myapplication';
// A list of local resources we always want to be cached.
const PRECACHE_URLS = [
CONTEXT + '/',
CONTEXT + '/index.html'
];