Browse Source

Cache favicon with ServiceWorker

RobinLinus 6 năm trước cách đây
mục cha
commit
819697d697
2 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 2 2
      client/index.html
  2. 3 2
      client/service-worker.js

+ 2 - 2
client/index.html

@@ -20,8 +20,8 @@
     <meta name="twitter:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
     <meta name="og:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
     <!-- Icons -->
-    <link rel="icon" sizes="96x96" href="images/favicon-96x96.png?">
-    <link rel="shortcut icon" href="images/favicon-96x96.png?">
+    <link rel="icon" sizes="96x96" href="images/favicon-96x96.png">
+    <link rel="shortcut icon" href="images/favicon-96x96.png">
     <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
     <meta name="msapplication-TileImage" content="images/mstile-150x150.png">
     <link rel="fluid-icon" type="image/png" href="images/android-chrome-192x192.png">

+ 3 - 2
client/service-worker.js

@@ -1,10 +1,11 @@
-var CACHE_NAME = 'snapdrop-cache-v1.0';
+var CACHE_NAME = 'snapdrop-cache-v1.01';
 var urlsToCache = [
   '/',
   '/styles.css',
   '/scripts/network.js',
   '/scripts/ui.js',
-  '/sounds/blop.mp3'
+  '/sounds/blop.mp3',
+  '/images/favicon-96x96.png'
 ];
 
 self.addEventListener('install', function(event) {