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

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

Categories

HOME
grok
turing-machines
case
3d
numbers
composite-primary-key
nuget
onclick
python-multithreading
google-admin-sdk
mvc5
syntaxnet
project
owin
commonjs
reactive-programming
watson-conversation
mvc-mini-profiler
sar
lilypond
perlbrew
soot
nsurl
dst
deltaspike
papaparse
github3.py
getlasterror
numpy-broadcasting
swagger-php
android-augmented-reality
nohup
plaintext
attributeerror
smoothstate.js
placeholder
textsum
libgphoto2
lampp
dotnet-httpclient
spring-integration-sftp
twilio-click-to-call
page-replacement
oracleclient
pdf-conversion
cpu-cache
reachability
cronexpression
avspeechsynthesizer
np-spring
mobiledoc-kit
tfs-workitem
wiredep
lazybones
intel-c++
slash
exceldatareader
uncaught-typeerror
angular-carousel
lambda-architecture
verold
ora-00904
notorm
c++builder-xe5
workitem
nebula
flex++
scmmanager
abstract-data-type
alice
joomla3.1
pstack
fragmenttransaction
iboutlet
jquery-address
filemerge
automationelement
webdev.webserver
event-receiver
dataform
cdonts
luajava
metaweblog
todos
unmanagedresources

Resources

Encrypt Message