Skip to content

Checking for service worker updates if webapp is never closed #3534

Closed
@aherriot

Description

@aherriot

Question: Currently, a webapp made with create-react-app only checks for updates when it first loads using the registerServiceWorker function. If the app is added to a phone's homescreen, it may never close, and so it never checks for new versions. Is there a recommended way to get it to check more often? For example, setting an interval and calling register every day or so. The extreme solution would be to just call window.location.reload() periodically, but I am hoping for a less disruptive solution. What is the best approach?

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