Browse Source

Deferring script loading in document head

master
Mobius K 2 years ago
parent
commit
5bd00ba426
  1. 2
      scripts/service-worker.ts
  2. 5
      templates/layout.pug

2
scripts/service-worker.ts

@ -1,7 +1,7 @@
import { ServiceWorkerCache } from "shared/scripts/service-worker-cache";
// Identifier used to ensure browsers are caching the right version of assets
const cacheId = "6";
const cacheId = "7";
// Cache manipulator
const cache: ServiceWorkerCache = new ServiceWorkerCache(cacheId);

5
templates/layout.pug

@ -16,6 +16,9 @@ html(lang="en")
link(rel="stylesheet" href="bluetooth-class.css")
link(rel="manifest" href="manifest.json" crossorigin="use-credentials")
block scripts
script(src="bluetooth-class.js" defer)
body
.container.mdc-layout-grid
@ -28,5 +31,3 @@ html(lang="en")
| Built by
|
a(href="https://mobiusk.com") MobiusK
script(src="bluetooth-class.js")

Loading…
Cancel
Save