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

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?
Is it possible to use the new Push Notifications support in Chrome without GCM?
How to get registration id in push event in ServiceWorker?
Service Worker and transparent cache updates
Service-worker force update of new assets
Hosting service-worker file from CDN/Google Drive
How to use Google Analytics in Progressive Web Apps that may be offline?
Will Service Worker Query Cache Algorithm Allow Expression Matching URL paths?
How is the Push API's push service URL set?
Handle fetch in service worker but allow client to see redirect
Prevent redirection to root of site's origin after clicking push notification
What is the API for unregistering service workers in Chrome >= 44?
Failed to register a ServiceWorker: ServiceWorker cannot be started
Difference between serviceWorker.getRegistration and serviceWorker.ready.then

Categories

HOME
go
jpa
spark-streaming
angular-formly
angular2-material
serialization
cq5
3d-reconstruction
data-visualization
google-cloud-datalab
vert.x
barcode
qpython
p2p
little-proxy
ibeacon-android
why3
openbugs
google-form
keytool
package.json
atlassian-stash
job-scheduling
feathersjs
google-container-registry
sar
r-mice
monit
interpreter
xunit
draft-js-plugins
ckfinder
fragment-backstack
oculus
handler
sqsh
magento-1.8
kudu
mustache
jett
classcastexception
hunspell
indy10
arduino-ide
yowsup
numpy-broadcasting
openproject
numberpicker
movilizer
opencmis
phpdbg
jide
builder
linter
serde
dotnet-httpclient
mschart
bluez
corruption
azure-cli
css-transforms
type-theory
gpg-signature
baidu
sandcastle
cronexpression
segment-io
burrows-wheeler-transform
resourcemanager
jodd
findfirst
toast
themoviedb-api
xenomai
pypiserver
vigenere
roadkill-wiki
uncompress
canvg
bufferedinputstream
dbaccess
cosine-similarity
beatsmusic
packet-sniffers
iso-prolog
unix-socket
spring-remoting
dsym
websphere-esb
ora-06550
nebula
node-blade
http-status-code-410
pstack
xcode3.2
subproject
apache-whirr
oracle-enterprise-linux
jsr286
node-redis
promotion-code
mysql-error-1205
drawtobitmap
mtu
nhprof
object-database
aspmenu
hbm2java
zen
duplex
lxr
lalr
sifr3
contentpresenter
change-management

Resources

Encrypt Message