Skip to content

Commit 6bc4a8d

Browse files
authored
Recommend browsers use .well-known path for WAOA (#27)
* Recommend browsers use .well-known path for WAOA * Added 'placed in a directory'
1 parent 1c553c3 commit 6bc4a8d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

explainer.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ Example web app manifest at `https://partnerapp.com/manifest.json`
131131
}
132132
```
133133

134-
(`capture_link` from the [Declarative Link Capturing](https://github.com/WICG/sw-launch/blob/master/declarative_link_capturing.md) proposal added to examples for comparison.)
134+
(`capture_links` from the [Declarative Link Capturing](https://github.com/WICG/sw-launch/blob/master/declarative_link_capturing.md) proposal added to examples for comparison.)
135135

136136
A PWA matches a URL for URL handling if the URL matches one of the origin strings in `url_handlers` and the browser is able to validate that the origin agrees to let this app handle such a URL.
137137

138-
`url-handlers` can contain an origin that encompasses requesting PWA's scope and also other unrelated origins. Not restricting URLs to the same scope or domain as the requesting PWA allows the developer to use different domain names for the same content but handle them with the same PWA. See [this section](#web-app-to-origin-association) for how `url_handlers` requests can be validated with origins. Navigation redirection is not a good alternative with respect to offline scenarios.
138+
`url_handlers` can contain an origin that encompasses requesting PWA's scope and also other unrelated origins. Not restricting URLs to the same scope or domain as the requesting PWA allows the developer to use different domain names for the same content but handle them with the same PWA. See [this section](#web-app-to-origin-association) for how `url_handlers` requests can be validated with origins. Navigation redirection is not a good alternative with respect to offline scenarios.
139139

140140
#### Wildcard Matching
141141

@@ -153,7 +153,7 @@ We propose a platform-independent association json file format that origins coul
153153

154154
#### web-app-origin-association file
155155

156-
Example 1: web-app-origin-association file at both `www.contoso.com/web-app-origin-association.json` and `https://conto.so/web-app-origin-association.json` :
156+
Example 1: web-app-origin-association file at both `www.contoso.com/.well-known/web-app-origin-association` and `https://conto.so/.well-known/web-app-origin-association` :
157157

158158
``` json
159159
{
@@ -182,7 +182,7 @@ Example 1: web-app-origin-association file at both `www.contoso.com/web-app-orig
182182
}
183183
```
184184

185-
Example 2: web-app-origin-association file at `https://tenant.contoso.com/web-app-origin-association.json` :
185+
Example 2: web-app-origin-association file at `https://tenant.contoso.com/.well-known/web-app-origin-association` :
186186

187187
``` json
188188
{
@@ -229,9 +229,9 @@ Each `details` object contains:
229229

230230
#### File Location
231231

232-
To make use of the web-app-origin-association file, we suggest browsers locate it using a `<link rel="web-app-origin-association" href="/web-app-origin-association">` element in the header section of the main document at the origin's root path. Other formats such as `assetlinks.json` will have different requirements.
232+
To make use of the web-app-origin-association file, we suggest that association files be placed in a `.well-known` directory within the root path of the origin. In order to match an origin with a `*.` prefix, we suggest that the corresponding association file be placed relative to the root path of the domain. Eg. an origin `*.contoso.com` could have a `web-app-origin-association` file at `contoso.com/.well-known/web-app-origin-association`.
233233

234-
Alternatively, we suggest that association files be placed in relation to the root path of the origin. In order to match an origin with a `*.` prefix, we suggest that the corresponding association file be placed relative to the root path of the domain. Eg. an origin `*.contoso.com` could have a `web-app-origin-association` file at `contoso.com/web-app-origin-association`.
234+
Alternatively, we suggest browsers locate it using a `<link rel="web-app-origin-association" href="/web-app-origin-association">` element in the header section of the main document at the origin's root path.
235235

236236
#### Failure to Associate
237237

0 commit comments

Comments
 (0)