Explorar o código

Starting to making some improvements

Herton %!s(int64=4) %!d(string=hai) anos
pai
achega
f0768c0874
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  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 charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <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 -->
     <!-- Above the fold styles -->
     <style>.wrapper {max-width:500px;margin:1rem auto;text-align:center;padding:0 1rem;}</style>
     <style>.wrapper {max-width:500px;margin:1rem auto;text-align:center;padding:0 1rem;}</style>
     <!-- Non blocking styles -->
     <!-- Non blocking styles -->

+ 2 - 2
public/sw.js

@@ -1,8 +1,8 @@
 self.addEventListener('fetch', function(event) {
 self.addEventListener('fetch', function(event) {
     event.respondWith(async function() {
     event.respondWith(async function() {
         try{
         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());
             cache.put(event.request.url, res.clone());
             return res;
             return res;
         }
         }