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

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?
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

Categories

HOME
assembly
zend-framework
numbers
fftw
package
cublas
dojo
hpc
jquery-ui
opengl-3
recordrtc
extjs4.2
commonjs
dkim
distribution
null-pointer
firefox-addon
dimensional-modeling
forgot-password
xmonad
soci
gmm
ember-cli
scriptella
zxing
highstock
motion-detection
sinch
exchangewebservices
failover
uitapgesturerecognizer
finagle
memory-address
reactjs.net
indy10
modalviewcontroller
timing
modernizr
node-mssql
protein-database
filesystemwatcher
verifiable-c
unordered-map
mcustomscrollbar
odoo-website
vmware-fusion
xmldocument
monkey-testing
mesosphere
robomongo
dotnet-httpclient
posixct
pair-programming
java-bytecode-asm
sundials
oozie-coordinator
flac
universal-analytics
reachability
donations
node-request
usart
atlas
meteor-packages
omxplayer
actor-platform
redbeard-ios
preprocessor
segment-io
iotivity
wso2developerstudio
android-wake-lock
createprocess
relativelayout
decimalformat
dynatree
forwarding
doctype
ember-cli-rails
typemock
phpldapadmin
openbabel
qtwebengine
ss7
gnumeric
authlogic
maven-scm
square-bracket
multitasking
gtm-oauth2
ebay-lms
unit-of-work
route-provider
mysql-error-2013
preload
web-notifications
android-loadermanager
frameworkelementfactory
vfs
landscape-portrait
tmx
updatesourcetrigger
facebook-iframe
tabpanel
glui

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App