Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching root subpaths with an exception of e.g. /cms #12

Closed
Eccenux opened this issue Sep 13, 2020 · 2 comments
Closed

Matching root subpaths with an exception of e.g. /cms #12

Eccenux opened this issue Sep 13, 2020 · 2 comments

Comments

@Eccenux
Copy link

Eccenux commented Sep 13, 2020

I believe a quite common case is to have a public web page on root (/) and some CMS on a sub path (e.g. /cms, /admin). Effectively those can be completely separate applications.

Note that the public page typically would also have routes like "/product/123/title" or "/blog/2020/my-article".

So it would be useful to have a separate serviceWorker for both applications. And it would be useful to exclude "/cms/*" instead of defining all paths for the main app.

@wanderview
Copy link
Member

The main blocker for adding exclusions is supporting it for PWAs on android devices. Currently the OS does not make it possible for a URL intent to apply a filter that has an exclusion like this. Therefore this proposal is not pursuing exclusions at this time. If the OS changes we could add them in the future.

Note, however, there is a workaround today. You can register a service worker with no fetch handler for "/cms/*" and it will take precedence over other, more general registrations. While not as convenient, this is an existing method to exclude a particular subpath.

@Eccenux
Copy link
Author

Eccenux commented Sep 21, 2020

OK. That seems fine than. The workaround would work for me.

@Eccenux Eccenux closed this as completed Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants