Skip to content

_Update algorithm should unregister SW on 404 and 410 errors #204

Closed
@jyasskin

Description

@jyasskin

Currently the _Update algorithm says

  • If fetching the script fails due to the server returns a 4xx or 5xx response or equivalent, or there is a DNS error, or the connection times out, then:
    1. Reject promise with a new NetworkError.
    2. Set serviceWorkerRegistration.updatePromise to null.
    3. Abort these steps.

Both @annevk and @jakearchibald have suggested that all 4xx responses should be interpreted as unregistering the SW instead of as an update failure. AppCache only treates a 404 or 410 as deleting the AppCache, and I think some other responses like 403 may be transient, so I'm only proposing to match AppCache. If y'all think all 4xx responses should unregister instead, I won't argue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions