-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt to add service_workd and manifest, #55
- Loading branch information
Showing
6 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
self.addEventListener('install', function(e) { | ||
e.waitUntil( | ||
caches.open('progessive-elm').then(function(cache) { | ||
return cache.addAll([ | ||
'/elm/capture', | ||
]); | ||
}) | ||
); | ||
}); | ||
|
||
self.addEventListener('fetch', function(event) { | ||
console.log('Service Worker Intercept: ' + event.request.url); | ||
|
||
event.respondWith( | ||
|
||
caches.match(event.request).then(function(response) { | ||
|
||
console.log('Service Worker Serve: ' + event.request.url); | ||
|
||
return response || fetch(event.request); | ||
|
||
}) | ||
|
||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"short_name": "DWYL App", | ||
"name": "Spike using progressive web app", | ||
"icons": [ | ||
{ | ||
"src": "/images/favicon.ico", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
} | ||
], | ||
"start_url": "/", | ||
"display": "standalone", | ||
"theme_color": "#000000", | ||
"background_color": "#ffffff" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<h1>Elm PWA</h1> | ||
|
||
<div id="elm-app"></div> | ||
<div id="elm-app"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters