Переглянути джерело

Starting to making some improvements

Herton 4 роки тому
батько
коміт
f0768c0874
2 змінених файлів з 4 додано та 4 видалено
  1. 2 2
      public/index.html
  2. 2 2
      public/sw.js

+ 2 - 2
public/index.html

@@ -4,8 +4,8 @@
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Single page node server with no dependencies</title>
-    <meta name="description" content="Simgle file page basic page">
+    <title>Single page app node server with no dependencies</title>
+    <meta name="description" content="Simgle page basic server optimized for speed and PWA">
     <!-- Above the fold styles -->
     <style>.wrapper {max-width:500px;margin:1rem auto;text-align:center;padding:0 1rem;}</style>
     <!-- Non blocking styles -->

+ 2 - 2
public/sw.js

@@ -1,8 +1,8 @@
 self.addEventListener('fetch', function(event) {
     event.respondWith(async function() {
         try{
-            var res = await fetch(event.request);
-            var cache = await caches.open('cache');
+            const res = await fetch(event.request);
+            const cache = await caches.open('cache');
             cache.put(event.request.url, res.clone());
             return res;
         }