Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web App doesn't show "add to home screen" after uninstall

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

like image 338
Tomasz Golinski Avatar asked Dec 20 '25 15:12

Tomasz Golinski


1 Answers

You need to clean your browser data for your website (cookie, history and cache).

like image 189
Sing Avatar answered Dec 22 '25 07:12

Sing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!