mirror of
https://github.com/LukeSmithxyz/based.cooking.git
synced 2026-01-03 08:19:59 +00:00
This service worker will allow users to have fullly operational website even offline. Every asset they ever load will be cached, allowing the use in remote areas or in cases of bad reception. Strategy used is network first, but there is also a function for cache first approach in case it's more suitable (user would have to manually clear old assets in order for new one to load).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<footer>
|
||||
<hr/>
|
||||
<hr />
|
||||
<a href=".">homepage</a>
|
||||
<a href="./rss.xml">RSS</a>
|
||||
<a href="./atom.xml">atom</a>
|
||||
@@ -7,4 +7,11 @@
|
||||
<p>All site content is in the Public Domain.</p>
|
||||
<p><small>Powered by <a href="https://pedantic.software/git/blogit">blogit</a></small></p>
|
||||
</footer>
|
||||
</body></html>
|
||||
</body>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) { // If service worker is supported
|
||||
navigator.serviceWorker.register("./sw.js")
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user