Files
Jeffrey PosnickandGitHub 7d4c4434a4 Enable prettier (#2929)
* Deps and config

* Prettier output

* Update hardcoded file sizes

* More file size updates
2021-08-26 14:57:20 -07:00

24 lines
766 B
HTML

<html>
<head>
<meta charset="UTF-8" />
</head>
<body>
<h3>precache.addToCacheList()</h3>
<button class="js-index-unrevisioned">Add Unrevisioned Assets</button>
<script src="../../../../packages/workbox-core/build/browser/workbox-core.dev.js"></script>
<script src="../../../../packages/workbox-precaching/build/browser/workbox-precaching.dev.js"></script>
<script>
const precacheController = new workbox.precaching.PrecacheController();
const indexStringBtn = document.querySelector('.js-index-unrevisioned');
indexStringBtn.addEventListener('click', () => {
precacheController.addToCacheList([
'/index.html',
{url: '/example.html'},
]);
});
</script>
</body>
</html>