We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It worked for me:
config:
"cache": { "runtimeCaching": [ { "urlPattern": "http://localhost:1234/cache.jpg", "handler": "staleWhileRevalidate", "options": { "broadcastUpdate": { "channelName": "api-updates" } } } ] }
index.js
const updatesChannel = new BroadcastChannel('api-updates'); updatesChannel.addEventListener('message', event => { console.log(event); });
index.html contained <img src="http://localhost:1234/cache.jpg">. Changing out cache.jpg fires the eventlistener.
<img src="http://localhost:1234/cache.jpg">
Did you use staleWhileRevalidate?
staleWhileRevalidate
Originally posted by @mischnic in #4 (comment)
The text was updated successfully, but these errors were encountered:
I give my API response updated, which will trigger this listener, and also skipWaiting() then refresh broswer
skipWaiting()
Sorry, something went wrong.
No branches or pull requests
It worked for me:
config:
index.js
index.html contained
<img src="http://localhost:1234/cache.jpg">
.Changing out cache.jpg fires the eventlistener.
Did you use
staleWhileRevalidate
?Originally posted by @mischnic in #4 (comment)
The text was updated successfully, but these errors were encountered: