Click here to Skip to main content
14,383,744 members

Web Development

 
GeneralRe: Transaction scope and web apis Pin
Eddy Vluggen14-Nov-19 2:46
mveEddy Vluggen14-Nov-19 2:46 
GeneralRe: Transaction scope and web apis Pin
Richard Deeming14-Nov-19 2:55
mveRichard Deeming14-Nov-19 2:55 
GeneralRe: Transaction scope and web apis Pin
Eddy Vluggen14-Nov-19 3:17
mveEddy Vluggen14-Nov-19 3:17 
GeneralRe: Transaction scope and web apis Pin
Ger Hayden14-Nov-19 11:15
memberGer Hayden14-Nov-19 11:15 
AnswerRe: Transaction scope and web apis Pin
Richard Deeming14-Nov-19 3:42
mveRichard Deeming14-Nov-19 3:42 
GeneralRe: Transaction scope and web apis Pin
Ger Hayden14-Nov-19 11:13
memberGer Hayden14-Nov-19 11:13 
QuestionMessage Closed Pin
11-Nov-19 2:23
memberMember 1465157911-Nov-19 2:23 
QuestionWorkBox is not broadcasting updates. Pin
Member 1088816411-Nov-19 4:53
memberMember 1088816411-Nov-19 4:53 
Hi all. I cam having trouble finding any info on the google workbox project and the specific issue I am having with trying to publish updates.
I started on WorkBox 4 and have recently upgraded to the release candidate of version 5 to see if that helps and it did not.

My route is setup as
workbox.routing.registerRoute(
    /.*/,
    new workbox.strategies.StaleWhileRevalidate({
        plugins: [
            new workbox.broadcastUpdate.BroadcastUpdatePlugin({
                channelName: 'app-update-reload'
            })
        ]
    })
);


and, my index.html is supposed to catch the broadcasts using the following code but it never gets called by workbox:
<script>
    const updateChannel = new BroadcastChannel('app-update-reload');

    updateChannel.addEventListener('message', async (event) => {
        console.log(">>>>>>>>>>>>>>>>>> A new update is available!!!!!!!!!!");
    });
</script>


So, my problem is that the message event in my index.html never gets called by workbox when there is an update. I can see that the files are being updated when the manifest changes in the browser but the broadcast never happens.

I can manually broadcast from the service worker to test that the index.html is catching the event and it works. however, no matter what I've tried I can't get the StaleWhileRevalidate strategy to broadcast the update and I am pulling my hair out.

I verified that the caching strategy is indeed working and I can't figure out why it won't broadcast.

Any help would be GREATLY appreciated. Thanks!
SuggestionMessage Closed Pin
6-Nov-19 22:43
memberyuwee6-Nov-19 22:43 
QuestionPlease help: “Invalid argument supplied for foreach()” in Wordpress Pin
Member 146471226-Nov-19 14:28
memberMember 146471226-Nov-19 14:28 
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
Richard MacCutchan6-Nov-19 22:38
protectorRichard MacCutchan6-Nov-19 22:38 
AnswerRe: Please help: “Invalid argument supplied for foreach()” in Wordpress Pin
jkirkerx7-Nov-19 13:29
professionaljkirkerx7-Nov-19 13:29 
Questionweb development Pin
Member 142901874-Nov-19 2:55
memberMember 142901874-Nov-19 2:55 
AnswerRe: web development Pin
Richard MacCutchan4-Nov-19 3:27
protectorRichard MacCutchan4-Nov-19 3:27 
QuestionJquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 5:29
memberKGr2830-Oct-19 5:29 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Richard Deeming30-Oct-19 6:30
mveRichard Deeming30-Oct-19 6:30 
GeneralRe: Jquery fuction not called when I append achor tag . Pin
KGr2830-Oct-19 9:03
memberKGr2830-Oct-19 9:03 
AnswerRe: Jquery fuction not called when I append achor tag . Pin
Leanbridge Technologies1-Nov-19 23:24
professionalLeanbridge Technologies1-Nov-19 23:24 
QuestionLogin Information Pin
Member 1463762428-Oct-19 20:29
memberMember 1463762428-Oct-19 20:29 
AnswerRe: Login Information Pin
Richard MacCutchan28-Oct-19 22:54
protectorRichard MacCutchan28-Oct-19 22:54 
QuestionGrabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 10:12
memberKGr2828-Oct-19 10:12 
AnswerRe: Grabbing routeValues from ActionLink with jquery. Pin
ZurdoDev28-Oct-19 10:49
professionalZurdoDev28-Oct-19 10:49 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 10:52
memberKGr2828-Oct-19 10:52 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
Richard Deeming28-Oct-19 11:11
mveRichard Deeming28-Oct-19 11:11 
GeneralRe: Grabbing routeValues from ActionLink with jquery. Pin
KGr2828-Oct-19 11:34
memberKGr2828-Oct-19 11:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.