Skip to content

Allow registering Service Worker without https when using localhost #49

Description

@miina

Currently https is always enforced when registering the Service Worker (see here), however, http is allowed on localhost according to this page:

During development you'll be able to use service worker through localhost, but to deploy it on a site you'll need to have HTTPS setup on your server.

When developing on localhost without using https the Service Worker is not registered and an error shown in console instead, for example:
screen shot 2018-08-06 at 9 17 15 pm

Perhaps we should consider registering the Service Worker without enforcing the https in case of localhost to make it easier for developers using http locally on localhost.

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