Skip to content

Caching fails to download assets in Chrome 85 #486

Open

Description

@jampy

As stated here, Chrome now dislikes lots of parallel fetch() invocations unless the response body is consumed.

This practically prevents the initial download of the offline-plugin cache and also consequent updates. The Service Worker fails to install.

It's stuck in this status and fails after 10 minutes or so:

image

It took me a whole day to track down the problem to this code: https://github.com/NekR/offline-plugin/blob/master/src/misc/sw-template.js#L605

I don't want to say that the code is wrong but due to the behavior of Chrome the Promise.all() must be changed so that fetch() and cache.put() are done together.

I'm out of time to help you with a pull request on the master branch but here is my patched version for the 4.9.1 version: https://gist.github.com/jampy/4330e2008b09450da72a25aba2aa90be#file-sw-template-js-L629

Activity

  1. jampy commented on Sep 3, 2020

    @jampy
    Author

    FYI, my patch needed a little fix. Here is the better version: https://gist.github.com/jampy/635ab91e60907a7fe38fb18a1c11a94d#file-sw-template-js-L631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to 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