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

Detecting a service worker eviction
Service worker sync fires immediately, no matter internet connection
sw-toolbox: POST request not getting cached
Why browser loads service worker when going offline and cause “An unknown error occurred when fetching the script.”?
Disable service workers when in development mode.
Let user choose to update Service Worker
Can I cache mp3 files using service worker?
service worker install event is called before register event is completed
Can I dynamically modify start_url in the manifest.json file?
Progressive web apps: Update sw.js on Single Page Applications
Cache hits: service workers and browsers cache [duplicate]
maxAgeSeconds in sw-toolbox not working
Activate updated service worker on refresh
service worker fetch event on first load
Using sw-toolbox with gulp
What is the purpose of service worker?

Categories

HOME
uml
embedded
azure-stream-analytics
gradient
newrelic
yandex
permissions
mapbox
google-cloud-datalab
nfs
modal-dialog
joomla3.0
endeca
project-intu
jxl
rtf
google-form
entitymanager
dynamic-sql
soci
kendo-mobile
question2answer
google-cloud-print
surveymonkey
8051
sqlpackage
google-earth
mobx
mustache
quickfixj
fstream
servicestack-text
openalpr
google-earth-engine
sessionstorage
wmp
placeholder
android-checkbox
drupal-theming
vaadin-elements
activeperl
pair-programming
spring-data-couchbase
d3-force-directed
rmongo
mongodb-php
wso2developerstudio
simevents
omniauth-facebook
deep
tracker-enabled-dbcontext
false-sharing
rasterize
state-restoration
dllimport
pypiserver
dock
variadic-templates
primitive-types
post-commit-hook
create.js
jqmodal
grails-plugin-rabbitmq
ray
terminate
scriptaculous
eclipse-kepler
dtmf
traceability
alice
resource-management
booksleeve
joomla3.1
redis-py
iboutlet
oracle-enterprise-linux
android-holo-everywhere
timthumb
tmx
diagrams
tabpanel
spread
data-mapping
cuda.net
xslcompiledtransform

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