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 resolve Dynamic URLs dependencies through Service worker?
service-worker Is there a way to get informed if client quit?
How to create offline apps with Service Worker and srcset?
Service Worker not recognizing URLs in Fetch event
Cache busting through sw-precache on already versioned bundle files
How to create Service Work to store dynamic content in Progressive WEB APP?
Offline page is not showing in fetch function when using service worker?
Running Service workers continuosly in background?
Service Worker, double caching?
ServiceWorkerRegistration.active not being set first time (Chrome)
Pre cache folder and subfolder content
Push web api, notificationclick, how to open desktop client instead opening a new browser client
keys property doesn't exist on my PushRegistration object
Web push notifications not showing since Chrome switched to OSX notifications
Can I have multiple service workers both intercept the same fetch request?
Ensure service worker is updated when hosted on a CDN?

Categories

HOME
go
beautifulsoup
oracle12c
delphi-7
deep-learning
formal-languages
3d
jsf-2.2
rendering
entity-framework-core
google-apps
cq5
p2p
openpyxl
mod-security
jxl
flash-player
azure-iot-hub
red5
google-data-studio
wolframalpha
nodemcu
lilypond
question2answer
r-mice
short-url
interpreter
dynamically-generated
roundup
strongname
siri
maze
custom-post-type
bulletphysics
has-and-belongs-to-many
outliers
datastax-enterprise-graph
tpm
jaws
magento-1.8
boost-asio
volatile
anki
dumpbin
papaparse
code-snippets
jett
dsx-desktop
hreflang
hibernate-search
sharding
processwire
cd
sim-card
mcustomscrollbar
magento-1.9.3
watchface
wmp
subclipse
snapchat
x++
servermanager
flask-restful
ovf
jquery-ui-draggable
wcftestclient
reportservice2010
geotiff
page-replacement
boo
oozie-coordinator
payload
monkey
android-instrumentation
stripe-connect
microstation
latin
pre-build-event
false-sharing
toran-proxy
r-package
lazybones
opserver
haskell-warp
botan
entity-framework-4.3
android-broadcast
cosine-similarity
pseudo-class
metatrader5
imagefilter
kissfft
dot42
terminate
file-not-found
android-audiorecord
isqlquery
printdialog
cffile
nebula
facebook-timeline
composite-component
sqlclr
wimax
booksleeve
faye
apache-commons-dbutils
catransform3d
pylucene
appledoc
qglwidget
undefined-index
load-time
drupal-fivestar
aspmenu
ajax-polling
nstokenfield
skype4java
purepdf
mathematical-notation
cuda.net
xpsdocument
perl5.12

Resources

Encrypt Message