Skip to content

Commit

Permalink
πŸŽ‰ service worker victory!!!πŸŽ‰
Browse files Browse the repository at this point in the history
  • Loading branch information
notwaldorf committed Sep 7, 2016
1 parent 4262701 commit eabaa84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
console.log('registering service worker...')
//navigator.serviceWorker.register('/service-worker.js');
navigator.serviceWorker.register('/service-worker.js');
});
}
</script>
Expand Down
10 changes: 9 additions & 1 deletion sw-precache-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@ module.exports = {
'/bower_components/webcomponentsjs/webcomponents-lite.min.js',
'/bower_components/emojilib/emojis.json'
],
navigateFallback: '/index.html'
navigateFallback: '/index.html',
navigateFallbackWhitelist: [/^(?!\/__)/],

This comment has been minimized.

Copy link
@n1ywb

n1ywb Nov 21, 2016

How did you come up with this line of code? Not having it tripped me up when trying to implement polymerfire authentication (oddly auth worked without it on firefox but not chrome)

This comment has been minimized.

Copy link
@n1ywb

This comment has been minimized.

Copy link
@notwaldorf

notwaldorf Nov 21, 2016

Author Owner

Yup! πŸ‘

runtimeCaching: [
{
// cache Google user profile pics
urlPattern: /^https:\/\/lh3.googleusercontent.com\/.*/,
handler: 'networkFirst'
}
]
};

0 comments on commit eabaa84

Please sign in to comment.