Skip to content

Commit 82e4a74

Browse files
authored
Updates scope docs in web app manifest (google#7177)
* scope updates * tweak
1 parent 404594b commit 82e4a74

File tree

1 file changed

+10
-12
lines changed
  • src/content/en/fundamentals/web-app-manifest

1 file changed

+10
-12
lines changed

src/content/en/fundamentals/web-app-manifest/index.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ project_path: /web/fundamentals/_project.yaml
22
book_path: /web/fundamentals/_book.yaml
33
description: The web app manifest is a JSON file that gives you the ability to control how your web app or site appears to the user in areas where they would expect to see native apps (for example, a device's home screen), direct what the user can launch, and define its appearance at launch.
44

5-
{# wf_updated_on: 2018-12-11 #}
5+
{# wf_updated_on: 2019-01-31 #}
66
{# wf_published_on: 2016-02-11 #}
77
{# wf_blink_components: Manifest #}
88

@@ -20,7 +20,6 @@ Having a manifest is required by Chrome to show the
2020
A typical manifest file includes information about the app `name`, `icons` it
2121
should use, the `start_url` it should start at when launched, and more.
2222

23-
2423
## Create the manifest
2524

2625
A complete `manifest.json` file for a progressive web app.
@@ -47,23 +46,19 @@ A complete `manifest.json` file for a progressive web app.
4746
"theme_color": "#3367D6"
4847
}
4948

50-
5149
Note: See the [add to home screen criteria](/web/fundamentals/app-install-banners/#criteria)
5250
for the specific properties that are required to show the add to home screen
5351
prompt.
5452

55-
5653
## Tell the browser about your manifest
5754

5855
When you have created the manifest, add a `link` tag to all the pages that
5956
encompass your web app:
6057

61-
6258
<link rel="manifest" href="/manifest.json">
6359

6460
## Key manifest properties
6561

66-
6762
### `short_name` and/or `name` {: #name }
6863

6964
You must provide at least the `short_name` or `name` property. If both are
@@ -74,7 +69,6 @@ places where space may be limited. `name` is used in the
7469
"short_name": "Maps",
7570
"name": "Google Maps"
7671

77-
7872
### `icons` {: #icons }
7973

8074
When a user adds your site to their home screen, you can define a set of
@@ -183,13 +177,18 @@ Users prefer selecting the orientation.
183177
### `scope` {: #scope }
184178

185179
The `scope` defines the set of URLs that the browser considers to be within your
186-
app, and is used to decide when the user has left the app, and should be bounced
187-
back out to a browser tab. The `scope` controls the URL structure that
188-
encompasses all the entry and exit points in your web app. Your `start_url`
189-
must reside within the `scope`.
180+
app, and is used to decide when the user has left the app. The `scope`
181+
controls the URL structure that encompasses all the entry and exit points in
182+
your web app. Your `start_url` must reside within the `scope`.
190183

191184
"scope": "/maps/"
192185

186+
Caution: If the user clicks a link in your app that navigates outside of the
187+
`scope`, the link will open and render within the existing the PWA window. If
188+
you want the link to open in a browser tab, you must add `target="_blank"`
189+
to the `<a>` tag. On Android, links with `target="_blank"` will open in a
190+
Chrome Custom Tab.
191+
193192
A few other tips:
194193

195194
* If you don't include a `scope` in your manifest, then the default implied
@@ -275,7 +274,6 @@ tool. It's built into the Audits tab of Chrome DevTools, or can be run as an NPM
275274
module. You provide Lighthouse with a URL, it runs a suite of audits against that
276275
page, and then displays the results in a report.
277276

278-
279277
## What's next?
280278

281279
* If you're using a web app manifest, you'll probably want to set up an

0 commit comments

Comments
 (0)