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 much is the lifetime of a Service Worker, can it be controlled?
How can a initialize sw-precache with all site pages
How to test service worker background sync
service worker and client requests 'Cache-control': 'no-cache'
Service worker - get push data from my server
ServiceWorker not receiving fetch requests
how to add script in <head> section of prestashop
How to configure create-react-pwa with nested homepage (localhost/app)
Fetching cached objects in ServiceWorker - Failed
Service Worker cache busting
How to deploy updates to service workers running on customers' sites?
Permanently registered service workers
Service-worker and tracking
Service worker sync fires only the first time
Pass custom data to service worker sync?
Service worker update only changed content in cache, or share data between service workers

Categories

HOME
service-worker
microsoftgraph
fuelux
linkedin
c99
fpga
angular-formly
rsa
knitr
scripting
alsa
dojo
cq5
emscripten
limit
google-admin-sdk
lanczos
extjs4.2
vimdiff
google-form
shared-libraries
plink
selectize.js
android-intent
jersey-1.0
sencha-touch
solrcloud
lilypond
simpleitk
guzzle
babel
gulp-watch
r-mice
visual-studio-extensions
data.stackexchange.com
bulletphysics
corpus
mat
genexus-sd
cognos-bi
fstream
sendbird
sharding
raft
docfx
watchman
cd
flatmap
typesafe-config
logback-groovy
getchar
xbmc
chai-as-promised
netbeans6.8
geotiff
wpas
avx
quicktime
seq
shinobi
restore
reachability
ziparchive
nikeplus-api
rspec2
i386
udpclient
refinerycms
cfchart
false-sharing
rewrite
include-guards
google-books
video-player
sha512
git-ftp
j-security-check
xmltype
sql-scripts
angular-carousel
parallel-testing
jquery-slider
buffering
breakout
flex++
epiceditor
jquery-1.9
superscrollorama
android-sdk-2.3
frameworkelementfactory
faye
fitbounds
stress
denied
fsevents
u2netdk
webdev.webserver
entitydatasource
pos-for-.net
echo3
windows-identity
fail-fast-fail-early
business-model
pnrp

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile