Hi Am facing a behavior in service worker. After clearing all the cache load the page service worker loading everything to Cache API. then i went offline and reload the page the page is not getting loaded. I went online and loaded the page again then went offline a load the page this time the page getting loaded correctly.
i dont know why this behavior is it anything related to the wait time of service worker how to fix this.
After few debugging i found that my fetch code is not getting executed on very first page load. from second page load onward its getting the hit
my sample application hosted here https://ajeeshc.github.io/#/comments
My service worker file is available in here
complete demo code location here
have few reading towards the delay in registering the service worker cause this issue how to fix this ?