Skip to content

Thx. It worked for me: But just chrome, not fireFox, Don't know why #39

@kaiwenxiao

Description

@kaiwenxiao

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.

Did you use staleWhileRevalidate?

Originally posted by @mischnic in #4 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions