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

Manifest is missing short_name and start_url #324

Closed
jlengstorf opened this issue May 21, 2017 · 8 comments
Closed

Manifest is missing short_name and start_url #324

jlengstorf opened this issue May 21, 2017 · 8 comments

Comments

@jlengstorf
Copy link

jlengstorf commented May 21, 2017

The web-generated favicon manifest.json is missing the short_name and start_url fields, which causes Lighthouse to complain.

I know this isn't strictly the purpose of a favicon generator, but it's so useful for the rest of the PWA process that it seems worth adding this in, at least optionally.

EDIT:

Sane defaults don't necessarily require changes to the UI/CLI — only the output would need to change:

  • short_name could mirror name by default
  • start_url should default to "."
@joglr
Copy link

joglr commented Dec 2, 2017

I am struggling with this as well, since the short_name is also required for Web App Install banners to automatically show up:

Chrome automatically displays the banner when your app meets the following criteria:

  • Has a web app manifest file with:
  • a short_name (used on the home screen)
  • a name (used in the banner)
  • a 192x192 png icon (the icon declarations must include a mime type of image/png)
  • a start_url that loads

https://developers.google.com/web/fundamentals/app-install-banners/

As a temporary solution, I've tried to get the short_name in there anyways, by making my own manifest, but I can't get the generator to stop removing it. Does anyone know how to disable the manifest generation as a temporary solutuion? I've tried with keepExisting: true and the declared: false but nothing seems to work.

@phbernard
Copy link
Contributor

phbernard commented Jan 26, 2018

short_name
Granted. This field should be generated along with name. As RealFaviconGenerator's UI shows the appearance of the App name in the Android preview, it implicitly discourage long name. This makes the typed value a natural candidate for short_name.

start_url
The suggestion to default it to . makes sense. However, this doesn't work with Android Chrome Mobile 64.3282. The start_url is apparently relative to the manifest itself. If the manifest is in the root of the site, it's fine. But if it is put in a separate directory (as tested in the second compatibility test), suddenly start_url is wrong and so is the homesceen shortcut created by Chrome. Moreover, the visitor will notice the error when clicking the shortcut (not when he creates it).

@phbernard
Copy link
Contributor

short_name: deployed a minute ago.

start_url: No implemented (ie. no default value)

@odahcam
Copy link

odahcam commented Feb 1, 2018

start_url could be a simple "/".

@phbernard
Copy link
Contributor

phbernard commented Feb 1, 2018

I'm afraid that might be the right choice most of the times, but sometimes erroneous.

let's take a manifest that applies to a subsection of a website:

  • http://example.org/ : The main web site, with its logo, icons and manifest.
  • http://example.org/blog : The blog section, considered to be a totally different part of the company, although hosted on the same domain. Its has its own logo, icons and manifest.

In the second case, the start_url of the manifest should be set to /blog. The others possible values:

  • /: Upon opening, the visitor is presented http://example.org/, a page he may never have visited before.
  • (not set): The user adds the site to the home screen while viewing http://example.org/blog/some-article. Upon opening, the visitor is presented this page again. Although this is probably not what he wanted, at least he won't be surprised and just realize "add to home screen" has worked like bookmarking. Not great, but okay.

My feeling is that "no value" is the most harmless default choice.

@odahcam
Copy link

odahcam commented Feb 1, 2018

You are absolutely right, so I would just say: provide a field to customize this, using (not set) as default value. 😀

@phbernard
Copy link
Contributor

You probably mean RFG's current behavior :-D

image

@odahcam
Copy link

odahcam commented Feb 2, 2018

It seems a little confusing, manifest is not a Android only thing. 🤔

There should be something to advice developers of what they are really creating, maybe a PWA section to clearify these points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants