Cache gravatar requests
This commit is contained in:
@@ -29,5 +29,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/bundle.js"></script>
|
||||
<script type="text/javascript">
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('/service-worker.js')
|
||||
.then(function(reg) {
|
||||
console.log('SW registration succeeded');
|
||||
}).catch(function(error) {
|
||||
console.log('SW registration failed: ' + error);
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable */
|
||||
|
||||
/*
|
||||
Copyright 2014 Google Inc. All Rights Reserved.
|
||||
|
||||
@@ -52,6 +54,7 @@ Cache.prototype.addAll||(Cache.prototype.addAll=function(t){function e(t){this.n
|
||||
|
||||
// Assets
|
||||
global.toolbox.router.get(/\/static\//, global.toolbox.cacheFirst);
|
||||
global.toolbox.router.get('/(.*)', global.toolbox.fastest, {origin: 'https://secure.gravatar.com'});
|
||||
|
||||
// API GET calls
|
||||
global.toolbox.router.default = global.toolbox.networkFirst;
|
||||
|
||||
Reference in New Issue
Block a user