You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
offline-octopus/examples/pwa/index.html

22 lines
675 B

<!DOCTYPE html>
<html>
testing PWA
doesnt have to have a manifest as this is only for the home screen
surely works on iOS as my own IterativeExploration page is there
(somehow added to HomeScreen, yet nothing related found
cf serverhome/web/iterative-explorations.com/www/index.html )
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
// does not work on Firefox, use https rather than http
navigator.serviceWorker
.register('sw.js')
.then(reg => console.log('Service Worker: Registered (Pages)'))
.catch(err => console.log(`Service Worker: Error: ${err}`));
});
}
</script>
</html>