service-worker


Service worker's offline caching is not working if I add my PWA on home screen


I made a PWA. Currently is deployed on heroku. URL - https://plain-js-pwa.herokuapp.com/.
My PWA installs service worker and manifest.json file. If I open it on chrome on mobile phone and put my phone on flight mode, then refreshing the url still gives shows me my application. Its expected as my service worker is doing offline caching.
But when I add my PWA to home screen, and try to open it on flight mode then it doesn't work. This is probably my first PWA, so please help me. I am generating my service worker file from 'sw-precache-webpack-plugin'.
My manifest.json file is:
{
"name": "VanillaJS-webpack App",
"short_name": "VanillaJS-webpack App",
"description": null,
"dir": "auto",
"lang": "en-US",
"display": "standalone",
"orientation": "any",
"start_url": "/?homescreen=1",
"background_color": "#ee6e73",
"icons": [
{
"src": "android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

Related Links

How to know that Event.respondWith has finished(callback for Event.respondWith()
Is it possible to build a Progressive Web App without client side rendering?
Can I have multiple Progressive Web Apps on my site?
Using service workers across multiple subdomains
What's the difference between using the Service Worker Cache API and regular browser cache?
Access screen height and width in a service worker
Precedence rule for serviceworker in case of two serviceworkers
web push notification doesn't show if pc is off or sleeping
Use Service Worker to intercept requests on the first load of my site?
service worker showNotification require interaction flag
How to remotely dismiss notifications using web push notifications?
DOMException: Failed to register a ServiceWorker: ServiceWorker script evaluation failed
UpUp to force the offline.html even when online
event.waitUntil throws an error when called in a push event listener
Ignore ajax requests in service worker
How to de-duplicate notifications between native and progressive web app?

Categories

HOME
assembly
forms
dns
css3
pclxl
google-admin-sdk
title
alamofire
google-form
gource
feathersjs
asp.net-mvc-viewmodel
exploit
jquery-callback
jboss6.x
shared
flooding
calculation
constexpr
panoramas
eviews
event-flow
mobx
utorrent
database-comparison
jmockit
spring-security4
jett
mnist
imx6
engine.io
jpad
berkeley-db-je
globalize
dbcontext
custom-font
cup
janus
trigger.io
cd-burning
microstation
envi
vulcanize
iotivity
dimension
nservicebus5
bizagi
np-spring
dynatree
django-urls
coda
dronekit-android
jquery-forms-plugin
exceldatareader
showdialog
android-vibration
sql-scripts
jqmodal
verold
reflector
ios8-extension
spring-remoting
decoupling
cfcache
gae-quotas
ora-06550
artemis
jammer
isqlquery
virtual-pc
bjyauthorize
entity-attribute-value
htdocs
xcelsius
pylucene
presentation-layer
objective-j
cruisecontrol.rb
perl5.12
soappy
cardspace

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App