Skip to content

Instantly share code, notes, and snippets.

Bigger Picture biggerpicturestudio

Block or report user

Report or block biggerpicturestudio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .htaccess
<FilesMatch "^(OneSignalSDKWorker.*|service-worker.*|OneSignalSDKUpdaterWorker.*)\.(js)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
View import-sw.js
importScripts('service-worker.js'); // our Service Worker generated by sw-precache
importScripts(''); // OneSignal’s Service Worker
View sw-toolbox-config.js
runtimeCaching: [{
urlPattern: /api\.feedgist\.io/,
handler: 'networkFirst'
}, {
urlPattern: /.fbcdn\.net/,
handler: 'cacheFirst'
}, {
urlPattern: /akamaihd\.net/,
handler: 'cacheFirst'
}, {
View sw-registration.js
if ('serviceWorker' in navigator && location.hostname !== "localhost") {
window.addEventListener('load', function() {
navigator.serviceWorker.register(‚service-worker.js’).then(function(reg) {
// updatefound is fired if service-worker.js changes.
reg.onupdatefound = function() {
var installingWorker = reg.installing;
installingWorker.onstatechange = function() {
switch (installingWorker.state) {
case 'installed':
You can’t perform that action at this time.