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

Allow unique start_url for subdomains #470

Closed
gui-poa opened this issue Jun 13, 2016 · 15 comments
Closed

Allow unique start_url for subdomains #470

gui-poa opened this issue Jun 13, 2016 · 15 comments
Labels
Feature Request security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.

Comments

@gui-poa
Copy link

gui-poa commented Jun 13, 2016

Even with the access-control-allow-origin header in the manifest.json, it's not possible to use the same start_url for subdomains.

Manifest: property 'start_url' ignored, should be same origin as document.

It would be great to set the homepage in start_url for article pages in different subdomains.

https://twitter.com/jaffathecake/status/742415227015303168

@marcoscaceres
Copy link
Member

I think this depends on https://storage.spec.whatwg.org/#site

@marcoscaceres marcoscaceres added Feature Request security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response. labels Jun 28, 2016
@RobDolinMS
Copy link
Contributor

@gui-poa You might want to take a look at #449 to see a solution to that could address your case.

@thomaspessato
Copy link

thomaspessato commented Sep 12, 2016

@marcoscaceres have you heard any news about this? I'm really looking forward to use this 👊

@marcoscaceres
Copy link
Member

@thomaspessato, not yet, sorry :(

@gui-poa
Copy link
Author

gui-poa commented Mar 13, 2017

Just to let it clear:

We have articles published inside subdomains, like: sports.example.com, politics.example.com. So the best start_url when the user get prompted while reading an article should be the home: www.example.com

@RobDolinMS
Copy link
Contributor

@gui-poa Would you please elaborate on your example? Would there be a single PWA for example.com or would there potentially be multiple PWAs for sports.example.com and politics.example.com?

@gui-poa
Copy link
Author

gui-poa commented Mar 13, 2017

Both...

Like this:
news.example.com -> example.com (start url) SAME PWA
sports.example.com -> example.com (start_url) SAME PWA
politics.example.com -> example.com (start_url) SAME PWA

games.example.com -> games.example.com (start_url) ANOTHER PWA

@RobDolinMS
Copy link
Contributor

Trying to make sure I understand the set-up ...

There is one PWA with Manifest hosted at example.com/manifest.json:

{
   "name": "Example PWA",
   "start_url": "example.com"
}

There is another PWA with Manifest hosted at games.example.com/manifest.json:

{
  "name": "Another PWA",
  "start_url": "games.example.com"
}

These Manifests are referenced on the respective HTML pages:
HTML page: news.example.com includes:
<link rel="manifest" href="example.com/manifest.json" />

HTML page sports.example.com includes:
<link rel="manifest" href="example.com/manifest.json" />

HTML page politics.example.com includes:
<link rel="manifest" href="example.com/manifest.json" />

HTML page games.example.com includes:
<link rel="manifest" href="games.example.com/manifest.json" />

@gui-poa Is this an accurate description of the set-up ?

  • If there's more that I'm missing, would you please explain?
  • If this is an accurate description, would you please elaborate on what is not working?

@gui-poa
Copy link
Author

gui-poa commented Mar 14, 2017

Yes, you are right.

So talking about the first PWA (example.com and its subdomains[articles])

Today the user is never getting prompted while reading an article because of this:

manifest-br.json:1 Manifest: property 'start_url' ignored, should be same origin as document.
manifest-br.json:1 Manifest: property 'scope' ignored, should be same origin as document.

Thanks for your attention, Rob.

@gui-poa
Copy link
Author

gui-poa commented Mar 15, 2017

@gui-poa
Copy link
Author

gui-poa commented Mar 20, 2017

Rob, do you think this request is reasonable?

I'm planning a project to start killing the subdomains around here in the near future.

@RobDolinMS
Copy link
Contributor

Thanks @gui-poa. Sorry for my delayed response. I had family visiting and was away from GitHub.

I think the request is reasonable. I'm wondering if the idea of supporting multiple scopes as described in #449 would address this scenario.

@gui-poa
Copy link
Author

gui-poa commented Mar 29, 2017

No problem. :)
Yep, reading #449 I can't know if this would solve it.

@gui-poa
Copy link
Author

gui-poa commented Apr 15, 2017

Just to inform, Rob.

This week we removed the subdomains. And, as we expected, the number of PWA installations has increased. (as well as cancels too. lol)
a2hs

@gui-poa gui-poa closed this as completed Sep 29, 2017
@davido242
Copy link

Answers are not straightforward honestly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.
Projects
None yet
Development

No branches or pull requests

5 participants