It's my first time creating a web app. I managed to work it out so I got the actual chrome prompt to "add it to the home screen". Then I have uninstalled the web app from my mobile as I wanted to show it to my colleague. However, the prompt doesn't appear on the screen anymore.
Question: Is that an intended behavior or is it something wrong with my app/service worker? How can I prompt my phone to show the install banner for the 2nd time?
self.addEventListener('install', event => {
event.waitUntil(
caches.open('VKD-V1').then(
cache => cache.addAll([
'/kit/css/styles.css',
...
]))
.then( () => console.log( 'content is now available offline' ) )
.catch( () => console.log( 'oh noes! something went wrong' ) )
);
});
self.addEventListener('activate', event => {
//console.log('V1 activated');
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
});
cheers Tom
You need to clean your browser data for your website (cookie, history and cache).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With