diff options
| author | Christine Dodrill <me@christine.website> | 2019-05-21 21:47:09 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-21 21:47:09 -0400 |
| commit | d64c666255665c5e03812c47e70d6edb46432510 (patch) | |
| tree | 1dd44e77f7d57a5a52ccfa0fe96fc073cb3da2fe /static | |
| parent | a275fc754b4c82a81ba06f0f3cbddb39946db1ac (diff) | |
| download | xesite-d64c666255665c5e03812c47e70d6edb46432510.tar.xz xesite-d64c666255665c5e03812c47e70d6edb46432510.zip | |
add talks support (#40)
* add talks support
* gosimplify
Diffstat (limited to 'static')
| -rwxr-xr-x | static/js/sw.js | 10 | ||||
| -rw-r--r-- | static/talks/irc-why-it-failed.pdf | bin | 0 -> 807223 bytes | |||
| -rw-r--r-- | static/talks/thinking-different.pdf | bin | 0 -> 1096651 bytes |
3 files changed, 6 insertions, 4 deletions
diff --git a/static/js/sw.js b/static/js/sw.js index f258902..deaa947 100755 --- a/static/js/sw.js +++ b/static/js/sw.js @@ -5,11 +5,13 @@ self.addEventListener('install', function(event) { event.waitUntil(preLoad());
});
+const cacheName = "cache-2019-05-21";
+
var preLoad = function(){
console.log('[PWA Builder] Install Event processing');
- return caches.open('offline').then(function(cache) {
+ return caches.open(cacheName).then(function(cache) {
console.log('[PWA Builder] Cached index and offline page during Install');
- return cache.addAll(['/blog/', '/blog', '/', '/contact', '/resume']);
+ return cache.addAll(['/blog/', '/blog', '/', '/contact', '/resume', '/talks']);
});
};
@@ -37,7 +39,7 @@ var checkResponse = function(request){ };
var addToCache = function(request){
- return caches.open('offline').then(function (cache) {
+ return caches.open(cacheName).then(function (cache) {
return fetch(request).then(function (response) {
console.log('[PWA Builder] add page to offline: ' + response.url);
return cache.put(request, response);
@@ -46,7 +48,7 @@ var addToCache = function(request){ };
var returnFromCache = function(request){
- return caches.open('offline').then(function (cache) {
+ return caches.open(cacheName).then(function (cache) {
return cache.match(request).then(function (matching) {
if(!matching || matching.status == 404) {
return cache.match('offline.html');
diff --git a/static/talks/irc-why-it-failed.pdf b/static/talks/irc-why-it-failed.pdf Binary files differnew file mode 100644 index 0000000..6d81031 --- /dev/null +++ b/static/talks/irc-why-it-failed.pdf diff --git a/static/talks/thinking-different.pdf b/static/talks/thinking-different.pdf Binary files differnew file mode 100644 index 0000000..fd225ee --- /dev/null +++ b/static/talks/thinking-different.pdf |
