Skip to content

feat: service worker awareness of registered subdomains #720

@SgtPooki

Description

@SgtPooki

When using the service-worker gateway, everything is client-side except the distribution of the service worker and assets to handle configuration and UI.

I have been thinking for a while that it would be cool to keep a list on the root domain of all subdomains that have been registered, so non-technical users don't need to clear their entire browser cache, or go into service worker config, etc.. to clear things out. Also, it would be cool to be reminded of pages you have cached.

The UI would be something like:

  1. visit inbrowser.link/#ipfs-sw-subdomains (or show on config page.., but we use that when loading subdomains so i dont like that idea)
  2. see a list of subdomains that have been registered. You can click a little gear icon or something to deregister a subdomain service worker (just link to subdomain and ?ipfs-sw-deregister, see Document how to manually deregister SW #506), or clear it's cache (Document how to manually purge Cache created by SW #507) or just link to subdomains of cached sites you have..

Then you only ever have to remember one URL: inbrowser.link or whatever domain is hosting the sw-gateway you use.

The functionality for knowing what subdomains are registered would be:

  • when loading a subdomain, we load the config page in an iframe to pull the root config.
  • When doing this, we would write to indexDB or similar with the subdomain

What do you think? @lidel @2color @aschmahmann

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowenhancementNew feature or requestexp/intermediatePrior experience is likely helpfulkind/discussionTopical discussion; usually not changes to codebasekind/enhancementA net-new feature or improvement to an existing featureneed/community-inputNeeds input from the wider communityneed/maintainers-inputNeeds input from the current maintainer(s)questionFurther information is requestedstatus/blockedUnable to be worked further until needs are mettopic/design-front-endFront-end implementation of UX/UI worktopic/design-uxUX strategy, research, not solely visual design

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions