forked from w3c/manifest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
7707 lines (7435 loc) · 577 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="en" dir="ltr"><head>
<meta charset="utf-8">
<meta name="generator" content="ReSpec 35.1.2">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
span.example-title{text-transform:none}
:is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
div.illegal-example{color:red}
div.illegal-example p{color:#000}
aside.example div.example{border-left-width:.1em;border-color:#999;background:#fff}
</style>
<style>
.issue-label{text-transform:initial}
.warning>p:first-child{margin-top:0}
.warning{padding:.5em;border-left-width:.5em;border-left-style:solid}
span.warning{padding:.1em .5em .15em}
.issue.closed span.issue-number{text-decoration:line-through}
.issue.closed span.issue-number::after{content:" (Closed)";font-size:smaller}
.warning{border-color:#f11;border-color:var(--warning-border,#f11);border-width:.2em;border-style:solid;background:#fbe9e9;background:var(--warning-bg,#fbe9e9);color:#000;color:var(--text,#000)}
.warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em}
li.task-list-item{list-style:none}
input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
.issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}
</style>
<style>
dfn{cursor:pointer}
.dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font-family:"Helvetica Neue",sans-serif;font-size:small;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px}
.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
.dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;border-bottom-color:var(--indextable-hover-bg,#fff);top:0}
.dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1;border-bottom-color:var(--indextable-hover-bg,#a2a9b1)}
.dfn-panel *{margin:0}
.dfn-panel b{display:block;color:#000;color:var(--text,#000);margin-top:.25em}
.dfn-panel ul a[href]{color:#333;color:var(--text,#333)}
.dfn-panel>div{display:flex}
.dfn-panel a.self-link{font-weight:700;margin-right:auto}
.dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c}
.dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940}
.dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
.dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important}
.dfn-panel a[href]:hover{border-bottom-width:1px}
.dfn-panel ul{padding:0}
.dfn-panel li{margin-left:1em}
.dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}
</style>
<title>Web Application Manifest</title>
<style id="respec-mainstyle">
@keyframes pop{
0%{transform:scale(1,1)}
25%{transform:scale(1.25,1.25);opacity:.75}
100%{transform:scale(1,1)}
}
a.internalDFN{color:inherit;border-bottom:1px solid #99c;text-decoration:none}
a.externalDFN{color:inherit;border-bottom:1px dotted #ccc;text-decoration:none}
a.bibref{text-decoration:none}
.respec-offending-element:target{animation:pop .25s ease-in-out 0s 1}
.respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline}
@supports not (text-decoration:red wavy underline){
.respec-offending-element:not(pre){display:inline-block}
.respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x}
}
#references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
cite .bibref{font-style:normal}
a[href].orcid{padding-left:4px;padding-right:4px}
a[href].orcid>svg{margin-bottom:-2px}
ol.tof,ul.tof{list-style:none outside none}
.caption{margin-top:.5em;font-style:italic}
#issue-summary>ul{column-count:2}
#issue-summary li{list-style:none;display:inline-block}
details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top}
details.respec-tests-details>*{padding-right:2em}
details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em}
details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em}
details.respec-tests-details>ul{width:100%;margin-top:-.3em}
details.respec-tests-details>li{padding-left:1em}
.self-link:hover{opacity:1;text-decoration:none;background-color:transparent}
aside.example .marker>a.self-link{color:inherit}
.header-wrapper{display:flex;align-items:baseline}
:is(h2,h3,h4,h5,h6):not(#toc>h2,#abstract>h2,#sotd>h2,.head>h2){position:relative;left:-.5em}
:is(h2,h3,h4,h5,h6):not(#toch2)+a.self-link{color:inherit;order:-1;position:relative;left:-1.1em;font-size:1rem;opacity:.5}
:is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";text-decoration:none;color:var(--heading-text)}
:is(h2,h3)+a.self-link{top:-.2em}
:is(h4,h5,h6)+a.self-link::before{color:#000}
@media (max-width:767px){
dd{margin-left:0}
}
@media print{
.removeOnSave{display:none}
}
</style>
<style>
.icon-title {
text-transform: uppercase;
font-weight: bold;
}
.icons {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.icons > figure {
text-align: left;
margin: 0;
padding: 10px;
width: 188px;
}
.icons > figure > img {
width: 188px;
height: 188px;
min-width: 188px;
min-height: 188px;
}
.icons > figure .icon-title {
display: block;
}
</style>
<meta name="color-scheme" content="light">
<style>
ul.index{columns:30ch;column-gap:1.5em}
ul.index li{list-style:inherit}
ul.index li span{color:inherit;cursor:pointer;white-space:normal}
#index-defined-here ul.index li{font-size:.9rem}
ul.index code{color:inherit}
#index-defined-here .print-only{display:none}
@media print{
#index-defined-here .print-only{display:initial}
}
</style>
<style>
.mdn{font-size:.75em;position:absolute;right:.3em;min-width:0;margin-top:3rem}
.mdn details{width:100%;margin:1px 0;position:relative;z-index:10;box-sizing:border-box;padding:.4em;padding-top:0}
.mdn details[open]{min-width:25ch;max-width:32ch;background:#fff;background:var(--indextable-hover-bg,#fff);color:#000;color:var(--indextable-hover-text,#000);box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);box-shadow:0 1em 3em -.4em var(--tocsidebar-shadow,rgba(0,0,0,.3)),0 0 1px 1px var(--tocsidebar-shadow,rgba(0,0,0,.05));border-radius:2px;z-index:11;margin-bottom:.4em}
.mdn summary{text-align:right;cursor:default;margin-right:-.4em}
.mdn summary span{font-family:zillaslab,Palatino,"Palatino Linotype",serif;color:#fff;color:var(--bg,#fff);background-color:#000;background-color:var(--text,#000);display:inline-block;padding:3px}
.mdn a{display:inline-block;word-break:break-all}
.mdn p{margin:0}
.mdn .engines-all{color:#058b00}
.mdn .engines-some{color:#b00}
.mdn table{width:100%;font-size:.9em}
.mdn td{border:none}
.mdn td:nth-child(2){text-align:right}
.mdn .nosupportdata{font-style:italic;margin:0}
.mdn tr::before{content:"";display:table-cell;width:1.5em;height:1.5em;background:no-repeat center center/contain;font-size:.75em}
.mdn .no,.mdn .unknown{color:#ccc;filter:grayscale(100%)}
.mdn .no::before,.mdn .unknown::before{opacity:.5}
.mdn .chrome::before,.mdn .chrome_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/chrome/chrome.svg)}
.mdn .edge::before,.mdn .edge_mobile::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/edge/edge.svg)}
.mdn .firefox::before,.mdn .firefox_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/firefox/firefox.svg)}
.mdn .opera::before,.mdn .opera_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/opera/opera.svg)}
.mdn .safari::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari/safari.svg)}
.mdn .safari_ios::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/safari-ios/safari-ios.svg)}
.mdn .samsunginternet_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/samsung-internet/samsung-internet.svg)}
.mdn .webview_android::before{background-image:url(https://www.w3.org/assets/logos/browser-logos/android-webview/android-webview.png)}
</style>
<meta name="revision" content="ec8a23b832f106517a6e03cadc8b5efee923b0cb">
<meta name="description" content="This specification defines a JSON-based file format that provides
developers with a centralized place to put metadata associated with a
web application. This metadata includes, but is not limited to, the web
application's name, links to icons, as well as the preferred URL to
open when a user launches the web application. The manifest also allows
developers to declare a default screen orientation for their web
application, as well as providing the ability to set the display mode
for the application (e.g., in fullscreen). Additionally, the manifest
allows a developer to "scope" a web application to a URL. This
restricts the URLs to which the manifest is applied and provides a
means to "deep link" into a web application from other applications.">
<style>
.hljs{--base:#fafafa;--mono-1:#383a42;--mono-2:#686b77;--mono-3:#717277;--hue-1:#0b76c5;--hue-2:#336ae3;--hue-3:#a626a4;--hue-4:#42803c;--hue-5:#ca4706;--hue-5-2:#c91243;--hue-6:#986801;--hue-6-2:#9a6a01}
@media (prefers-color-scheme:dark){
.hljs{--base:#282c34;--mono-1:#abb2bf;--mono-2:#818896;--mono-3:#5c6370;--hue-1:#56b6c2;--hue-2:#61aeee;--hue-3:#c678dd;--hue-4:#98c379;--hue-5:#e06c75;--hue-5-2:#be5046;--hue-6:#d19a66;--hue-6-2:#e6c07b}
}
.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;color:var(--mono-1,#383a42);background:#fafafa;background:var(--base,#fafafa)}
.hljs-comment,.hljs-quote{color:#717277;color:var(--mono-3,#717277);font-style:italic}
.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4;color:var(--hue-3,#a626a4)}
.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#ca4706;color:var(--hue-5,#ca4706);font-weight:700}
.hljs-literal{color:#0b76c5;color:var(--hue-1,#0b76c5)}
.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#42803c;color:var(--hue-4,#42803c)}
.hljs-built_in,.hljs-class .hljs-title{color:#9a6a01;color:var(--hue-6-2,#9a6a01)}
.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801;color:var(--hue-6,#986801)}
.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3;color:var(--hue-2,#336ae3)}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:700}
.hljs-link{text-decoration:underline}
</style>
<style>
var{position:relative;cursor:pointer}
var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}
var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#222}
var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#222;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400}
var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}
</style>
<script id="initialUserConfig" type="application/json">{
"mdn": true,
"previousPublishDate": "2013-12-17",
"specStatus": "ED",
"shortName": "appmanifest",
"prevVersion": "FPWD",
"previousMaturity": "WD",
"formerEditors": [
{
"name": "Matt Giuca",
"company": "Google Inc.",
"companyURL": "https://www.google.com/",
"w3cid": 91260,
"retiredDate": "2024-07-01"
},
{
"name": "Anssi Kostiainen",
"company": "Intel Corporation",
"companyURL": "https://intel.com/",
"w3cid": 41974,
"retiredDate": "2024-05-10"
},
{
"name": "Aaron Gustafson",
"company": "Microsoft Corporation",
"companyURL": "https://microsoft.com/",
"w3cid": 43672,
"retiredDate": "2024-05-10"
},
{
"name": "Mounir Lamouri",
"company": "Google Inc.",
"companyURL": "https://www.google.com/"
},
{
"name": "Rob Dolin",
"company": "Microsoft Corporation",
"companyURL": "https://www.microsoft.com/"
}
],
"editors": [
{
"name": "Marcos Cáceres",
"company": "Apple",
"companyURL": "https://apple.com",
"w3cid": 39125
},
{
"name": "Kenneth Rohde Christiansen",
"company": "Intel Corporation",
"companyURL": "https://intel.com/",
"w3cid": 57705
},
{
"name": "Diego González",
"company": "Microsoft Corporation",
"companyURL": "https://microsoft.com/",
"w3cid": 66757
},
{
"name": "Daniel Murphy",
"company": "Google Inc.",
"companyURL": "https://www.google.com/",
"w3cid": 90918
},
{
"name": "Christian Liebel",
"company": "Thinktecture AG",
"companyURL": "https://www.thinktecture.com/",
"w3cid": 109589
}
],
"group": "webapps",
"github": "https://github.com/w3c/manifest/",
"caniuse": "web-app-manifest",
"xref": "web-platform",
"gitRevision": "ec8a23b832f106517a6e03cadc8b5efee923b0cb",
"publishISODate": "2024-11-07T00:00:00.000Z",
"generatedSubtitle": "W3C Editor's Draft 07 November 2024"
}</script>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED"></head>
<body data-cite="ENCODING SCREEN-ORIENTATION MEDIAQUERIES-5 IMAGE-RESOURCE MIMESNIFF HTML INFRA URL WEBIDL DOM FETCH" class="h-entry"><div class="head">
<p class="logos"><a class="logo" href="https://www.w3.org/"><img crossorigin="" alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72">
</a></p>
<h1 id="title" class="title">Web Application Manifest</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#ED">W3C Editor's Draft</a> <time class="dt-published" datetime="2024-11-07">07 November 2024</time></p>
<details open="">
<summary>More details about this document</summary>
<dl>
<dt>This version:</dt><dd>
<a class="u-url" href="https://w3c.github.io/manifest/">https://w3c.github.io/manifest/</a>
</dd>
<dt>Latest published version:</dt><dd>
<a href="https://www.w3.org/TR/appmanifest/">https://www.w3.org/TR/appmanifest/</a>
</dd>
<dt>Latest editor's draft:</dt><dd><a href="https://w3c.github.io/manifest/">https://w3c.github.io/manifest/</a></dd>
<dt>History:</dt><dd>
<a href="https://www.w3.org/standards/history/appmanifest/">https://www.w3.org/standards/history/appmanifest/</a>
</dd><dd>
<a href="https://github.com/w3c/manifest/commits/">Commit history</a>
</dd>
<dt>Editors:</dt><dd class="editor p-author h-card vcard" data-editor-id="39125">
<span class="p-name fn">Marcos Cáceres</span> (<a class="p-org org h-org" href="https://apple.com">Apple</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="57705">
<span class="p-name fn">Kenneth Rohde Christiansen</span> (<a class="p-org org h-org" href="https://intel.com/">Intel Corporation</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="66757">
<span class="p-name fn">Diego González</span> (<a class="p-org org h-org" href="https://microsoft.com/">Microsoft Corporation</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="90918">
<span class="p-name fn">Daniel Murphy</span> (<a class="p-org org h-org" href="https://www.google.com/">Google Inc.</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="109589">
<span class="p-name fn">Christian Liebel</span> (<a class="p-org org h-org" href="https://www.thinktecture.com/">Thinktecture AG</a>)
</dd>
<dt>
Former editors:
</dt><dd class="editor p-author h-card vcard" data-editor-id="91260">
<span class="p-name fn">Matt Giuca</span> (<a class="p-org org h-org" href="https://www.google.com/">Google Inc.</a>) - Until <time datetime="2024-07-01">01 July 2024</time>
</dd><dd class="editor p-author h-card vcard" data-editor-id="41974">
<span class="p-name fn">Anssi Kostiainen</span> (<a class="p-org org h-org" href="https://intel.com/">Intel Corporation</a>) - Until <time datetime="2024-05-10">10 May 2024</time>
</dd><dd class="editor p-author h-card vcard" data-editor-id="43672">
<span class="p-name fn">Aaron Gustafson</span> (<a class="p-org org h-org" href="https://microsoft.com/">Microsoft Corporation</a>) - Until <time datetime="2024-05-10">10 May 2024</time>
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Mounir Lamouri</span> (<a class="p-org org h-org" href="https://www.google.com/">Google Inc.</a>)
</dd><dd class="editor p-author h-card vcard">
<span class="p-name fn">Rob Dolin</span> (<a class="p-org org h-org" href="https://www.microsoft.com/">Microsoft Corporation</a>)
</dd>
<dt>Feedback:</dt><dd>
<a href="https://github.com/w3c/manifest/">GitHub w3c/manifest</a>
(<a href="https://github.com/w3c/manifest/pulls/">pull requests</a>,
<a href="https://github.com/w3c/manifest/issues/new/choose">new issue</a>,
<a href="https://github.com/w3c/manifest/issues/">open issues</a>)
</dd>
<dt class="caniuse-title">Browser support:</dt><dd class="caniuse-stats"><a href="https://caniuse.com/web-app-manifest">caniuse.com</a></dd></dl>
</details>
<p class="copyright">
<a href="https://www.w3.org/policies/#copyright">Copyright</a>
©
2024
<a href="https://www.w3.org/">World Wide Web Consortium</a>.
<abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup>
<a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>,
<a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and
<a rel="license" href="https://www.w3.org/copyright/software-license-2023/" title="W3C Software and Document Notice and License">permissive document license</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory"><h2>Abstract</h2>
<p>
This specification defines a JSON-based file format that provides
developers with a centralized place to put metadata associated with a
web application. This metadata includes, but is not limited to, the web
application's name, links to icons, as well as the preferred URL to
open when a user launches the web application. The manifest also allows
developers to declare a default screen orientation for their web
application, as well as providing the ability to set the display mode
for the application (e.g., in fullscreen). Additionally, the manifest
allows a developer to "scope" a web application to a URL. This
restricts the URLs to which the manifest is applied and provides a
means to "deep link" into a web application from other applications.
</p>
<p>
Using this metadata, user agents can provide developers with means to
create user experiences that are more comparable to that of a native
application.
</p>
</section>
<section id="sotd" class="introductory"><h2>Status of This Document</h2><p><em>This section describes the status of this
document at the time of its publication. A list of current <abbr title="World Wide Web Consortium">W3C</abbr>
publications and the latest revision of this technical report can be found
in the <a href="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at
https://www.w3.org/TR/.</em></p>
<div class="warning" id="issue-container-generatedID"><div role="heading" class="warning-title marker" id="h-warning" aria-level="3"><span>Warning</span></div><aside class="">
<p>
Implementors need to be aware that this specification is not stable.
However, aspects of this specification are shipping in at least one
browser (see links to implementation status at the top of this
document). <strong>Implementors who are not taking part in the
discussions will find the specification changing out from under them
in incompatible ways.</strong> Vendors interested in implementing
this specification before it eventually reaches the Candidate
Recommendation phase should <a href="https://github.com/w3c/manifest/issues">subscribe to the repository
on GitHub</a> and take part in the discussions.
</p>
</aside></div>
<p>
This document was published by the <a href="https://www.w3.org/groups/wg/webapps">Web Applications Working Group</a> as
an Editor's Draft.
</p><p>Publication as an Editor's Draft does not
imply endorsement by <abbr title="World Wide Web Consortium">W3C</abbr> and its Members. </p><p>
This is a draft document and may be updated, replaced or obsoleted by other
documents at any time. It is inappropriate to cite this document as other
than work in progress.
</p><p>
This document was produced by a group
operating under the
<a href="https://www.w3.org/policies/patent-policy/"><abbr title="World Wide Web Consortium">W3C</abbr> Patent
Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a
<a rel="disclosure" href="https://www.w3.org/groups/wg/webapps/ipr">public list of any patent disclosures</a>
made in connection with the deliverables of
the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains
<a href="https://www.w3.org/policies/patent-policy/#def-essential">Essential Claim(s)</a>
must disclose the information in accordance with
<a href="https://www.w3.org/policies/patent-policy/#sec-Disclosure">section 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
</p><p>
This document is governed by the
<a id="w3c_process_revision" href="https://www.w3.org/policies/process/20231103/">03 November 2023 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
</p></section><nav id="toc"><h2 class="introductory" id="table-of-contents">Table of Contents</h2><ol class="toc"><li class="tocline"><a class="tocxref" href="#abstract">Abstract</a></li><li class="tocline"><a class="tocxref" href="#sotd">Status of This Document</a></li><li class="tocline"><a class="tocxref" href="#web-application-manifest"><bdi class="secno">1. </bdi>
Web Application Manifest
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#examples"><bdi class="secno">1.1 </bdi>
Examples
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#typical-structure"><bdi class="secno">1.1.1 </bdi>
Typical structure
</a></li><li class="tocline"><a class="tocxref" href="#using-a-link-element-to-link-to-a-manifest"><bdi class="secno">1.1.2 </bdi>
Using a <code>link</code> element to link to a manifest
</a></li><li class="tocline"><a class="tocxref" href="#declaring-multiple-icons"><bdi class="secno">1.1.3 </bdi>
Declaring multiple icons
</a></li><li class="tocline"><a class="tocxref" href="#creating-shortcuts"><bdi class="secno">1.1.4 </bdi>
Creating shortcuts
</a></li><li class="tocline"><a class="tocxref" href="#understanding-scope"><bdi class="secno">1.1.5 </bdi>
Understanding "scope"
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#dir-member"><bdi class="secno">1.2 </bdi>
<code>dir</code> member
</a></li><li class="tocline"><a class="tocxref" href="#lang-member"><bdi class="secno">1.3 </bdi>
<code>lang</code> member
</a></li><li class="tocline"><a class="tocxref" href="#name-member"><bdi class="secno">1.4 </bdi>
<code>name</code> member
</a></li><li class="tocline"><a class="tocxref" href="#short_name-member"><bdi class="secno">1.5 </bdi>
<code>short_name</code> member
</a></li><li class="tocline"><a class="tocxref" href="#scope-member"><bdi class="secno">1.6 </bdi>
<code>scope</code> member
</a></li><li class="tocline"><a class="tocxref" href="#icons-member"><bdi class="secno">1.7 </bdi>
<code>icons</code> member
</a></li><li class="tocline"><a class="tocxref" href="#display-member"><bdi class="secno">1.8 </bdi>
<code>display</code> member
</a></li><li class="tocline"><a class="tocxref" href="#orientation-member"><bdi class="secno">1.9 </bdi>
<code>orientation</code> member
</a></li><li class="tocline"><a class="tocxref" href="#start_url-member"><bdi class="secno">1.10 </bdi>
<code>start_url</code> member
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#privacy-consideration-start_url-tracking"><bdi class="secno">1.10.1 </bdi>
Privacy consideration: <span data-link-type="dfn|abstract-op" data-link-for="manifest" data-xref-for="manifest" class="formerLink"><code>start_url</code></span> tracking
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#id-member"><bdi class="secno">1.11 </bdi>
<code>id</code> member
</a></li><li class="tocline"><a class="tocxref" href="#theme_color-member"><bdi class="secno">1.12 </bdi>
<code>theme_color</code> member
</a></li><li class="tocline"><a class="tocxref" href="#background_color-member"><bdi class="secno">1.13 </bdi>
<code>background_color</code> member
</a></li><li class="tocline"><a class="tocxref" href="#shortcuts-member"><bdi class="secno">1.14 </bdi>
<code>shortcuts</code> member
</a></li><li class="tocline"><a class="tocxref" href="#x_localized-members"><bdi class="secno">1.15 </bdi>
<code>*_localized</code> members
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#localizing-text-values"><bdi class="secno">1.15.1 </bdi>
Localizing text values
</a></li><li class="tocline"><a class="tocxref" href="#localizing-image-resources"><bdi class="secno">1.15.2 </bdi>
Localizing image resources
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#manifest-life-cycle"><bdi class="secno">1.16 </bdi>
Manifest life-cycle
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#processing"><bdi class="secno">1.16.1 </bdi>
Processing the manifest
</a></li><li class="tocline"><a class="tocxref" href="#processing-color-members"><bdi class="secno">1.16.2 </bdi>
Processing color members
</a></li><li class="tocline"><a class="tocxref" href="#processing-text-members"><bdi class="secno">1.16.3 </bdi>
Processing text members
</a></li><li class="tocline"><a class="tocxref" href="#processing-the-manifest-without-a-document"><bdi class="secno">1.16.4 </bdi>
Processing the manifest without a document
</a></li><li class="tocline"><a class="tocxref" href="#applying"><bdi class="secno">1.16.5 </bdi>
Applying the manifest
</a></li><li class="tocline"><a class="tocxref" href="#updating"><bdi class="secno">1.16.6 </bdi>
Updating the manifest
</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#manifest-image-resources"><bdi class="secno">2. </bdi>
Manifest image resources
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#purpose-member"><bdi class="secno">2.1 </bdi>
<code>purpose</code> member
</a></li><li class="tocline"><a class="tocxref" href="#content-security-policy"><bdi class="secno">2.2 </bdi>
Content security policy
</a></li><li class="tocline"><a class="tocxref" href="#icon-masks"><bdi class="secno">2.3 </bdi>
Icon masks and safe zone
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#examples-of-masks"><bdi class="secno">2.3.1 </bdi>
Examples of masks
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#icons-with-maskable-purpose"><bdi class="secno">2.3.1.1 </bdi>
Icons with "maskable" purpose
</a></li><li class="tocline"><a class="tocxref" href="#mask-examples"><bdi class="secno">2.3.1.2 </bdi>
Mask examples
</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#monochrome-icons-and-solid-fills"><bdi class="secno">2.4 </bdi>
Monochrome icons and solid fills
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#example-usage-of-monochrome-icons"><bdi class="secno">2.4.1 </bdi>
Example usage of monochrome icons
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#usage-examples"><bdi class="secno">2.4.1.1 </bdi>
Usage examples
</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#processing-image-resources"><bdi class="secno">2.5 </bdi>
Processing image resources
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#shortcut-items"><bdi class="secno">3. </bdi>
Shortcut items
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#name-member-0"><bdi class="secno">3.1 </bdi>
<code>name</code> member
</a></li><li class="tocline"><a class="tocxref" href="#short_name-member-0"><bdi class="secno">3.2 </bdi>
<code>short_name</code> member
</a></li><li class="tocline"><a class="tocxref" href="#description-member"><bdi class="secno">3.3 </bdi>
<code>description</code> member
</a></li><li class="tocline"><a class="tocxref" href="#url-member"><bdi class="secno">3.4 </bdi>
<code>url</code> member
</a></li><li class="tocline"><a class="tocxref" href="#icons-member-0"><bdi class="secno">3.5 </bdi>
<code>icons</code> member
</a></li><li class="tocline"><a class="tocxref" href="#launching-a-shortcut"><bdi class="secno">3.6 </bdi>
<span>Launching a shortcut</span>
</a></li><li class="tocline"><a class="tocxref" href="#processing-shortcut-items"><bdi class="secno">3.7 </bdi>
Processing shortcut items
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#installable-web-applications"><bdi class="secno">4. </bdi>
Installable web applications
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#application-s-name"><bdi class="secno">4.1 </bdi>
Application's name
</a></li><li class="tocline"><a class="tocxref" href="#launching-a-web-application"><bdi class="secno">4.2 </bdi>
Launching a web application
</a></li><li class="tocline"><a class="tocxref" href="#installation-sec"><bdi class="secno">4.3 </bdi>
Privacy and security considerations
</a></li><li class="tocline"><a class="tocxref" href="#uninstallation"><bdi class="secno">4.4 </bdi>
Uninstallation
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#nav-scope"><bdi class="secno">5. </bdi>
Navigation scope
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#navigation-scope-security-considerations"><bdi class="secno">5.1 </bdi>
Security considerations
</a></li><li class="tocline"><a class="tocxref" href="#deep-links"><bdi class="secno">5.2 </bdi>
Deep links
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#display-modes"><bdi class="secno">6. </bdi>
Display modes
</a></li><li class="tocline"><a class="tocxref" href="#priv-sec"><bdi class="secno">7. </bdi>
Privacy and security considerations
</a></li><li class="tocline"><a class="tocxref" href="#iana-considerations"><bdi class="secno">A. </bdi>
<abbr title="Internet Assigned Numbers Authority">IANA</abbr> considerations
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#media-type-registration"><bdi class="secno">A.1 </bdi>
Media type registration
</a></li><li class="tocline"><a class="tocxref" href="#link-relation-type-registration"><bdi class="secno">A.2 </bdi>
Link relation type registration
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#conformance"><bdi class="secno">B. </bdi>Conformance</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#extensibility"><bdi class="secno">B.1 </bdi>
Extensibility
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#proprietary-extensions"><bdi class="secno">B.1.1 </bdi>
Proprietary manifest members
</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#incubations"><bdi class="secno">C. </bdi>
Incubations
</a></li><li class="tocline"><a class="tocxref" href="#application-information"><bdi class="secno">D. </bdi>
Application Information
</a></li><li class="tocline"><a class="tocxref" href="#relationship-to-html-s-link-and-meta-elements"><bdi class="secno">E. </bdi>
Relationship to HTML's <code>link</code> and <code>meta</code> elements
</a></li><li class="tocline"><a class="tocxref" href="#json-schema"><bdi class="secno">F. </bdi>
JSON Schema
</a></li><li class="tocline"><a class="tocxref" href="#internationalization"><bdi class="secno">G. </bdi>
Internationalization
</a></li><li class="tocline"><a class="tocxref" href="#use-cases-and-requirements"><bdi class="secno">H. </bdi>
Use Cases and Requirements
</a></li><li class="tocline"><a class="tocxref" href="#issue-summary"><bdi class="secno">I. </bdi>Issue summary</a></li><li class="tocline"><a class="tocxref" href="#change-log"><bdi class="secno">J. </bdi>
Change log
</a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><bdi class="secno">K. </bdi>
Acknowledgements
</a></li><li class="tocline"><a class="tocxref" href="#index"><bdi class="secno">L. </bdi>Index</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#index-defined-here"><bdi class="secno">L.1 </bdi>Terms defined by this specification</a></li><li class="tocline"><a class="tocxref" href="#index-defined-elsewhere"><bdi class="secno">L.2 </bdi>Terms defined by reference</a></li></ol></li><li class="tocline"><a class="tocxref" href="#references"><bdi class="secno">M. </bdi>References</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><bdi class="secno">M.1 </bdi>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><bdi class="secno">M.2 </bdi>Informative references</a></li></ol></li></ol></nav>
<section id="web-application-manifest"><div class="header-wrapper"><h2 id="x1-web-application-manifest"><bdi class="secno">1. </bdi>
Web Application Manifest
</h2><a class="self-link" href="#web-application-manifest" aria-label="Permalink for Section 1."></a></div>
<p>
An <dfn data-export="" data-lt="manifest|application manifest|manifest's" data-local-lt="manifest's" id="dfn-manifest" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">application manifest</dfn> is a [<cite><a class="bibref" data-link-type="biblio" href="#bib-json" title="The JavaScript Object Notation (JSON) Data Interchange Format">JSON</a></cite>] document that
contains startup parameters and application defaults for when a web
application is launched.
</p>
<p>
A manifest has an associated <dfn class="export" data-export="" id="dfn-manifest-url" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">manifest URL</dfn>,
which is the [<cite><a class="bibref" data-link-type="biblio" href="#bib-url" title="URL Standard">URL</a></cite>] from which the <a href="#dfn-manifest" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-manifest-1">manifest</a> was fetched.
</p>
<p>
A <a data-link-type="dfn|abstract-op" href="#dfn-manifest" class="internalDFN" id="ref-for-dfn-manifest-2">manifest</a> can have any of the following members at its root, all
of which are optional. The members can appear in any order.
</p>
<ul>
<li><a data-link-type="dfn|abstract-op" href="#dfn-background_color" class="internalDFN" id="ref-for-dfn-background_color-1"><code>background_color</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-dir" class="internalDFN" id="ref-for-dfn-dir-1"><code>dir</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-display" class="internalDFN" id="ref-for-dfn-display-1"><code>display</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-icons" class="internalDFN" id="ref-for-dfn-icons-1"><code>icons</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-identity" class="internalDFN" id="ref-for-dfn-identity-1">identity</a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-lang" class="internalDFN" id="ref-for-dfn-lang-1"><code>lang</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-name" class="internalDFN" id="ref-for-dfn-name-1"><code>name</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-orientation" class="internalDFN" id="ref-for-dfn-orientation-1"><code>orientation</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-scope" class="internalDFN" id="ref-for-dfn-scope-1"><code>scope</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-short_name" class="internalDFN" id="ref-for-dfn-short_name-1"><code>short_name</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-shortcuts" class="internalDFN" id="ref-for-dfn-shortcuts-1"><code>shortcuts</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-start_url" class="internalDFN" id="ref-for-dfn-start_url-1"><code>start_url</code></a>
</li>
<li><a data-link-type="dfn|abstract-op" href="#dfn-theme_color" class="internalDFN" id="ref-for-dfn-theme_color-1"><code>theme_color</code></a>
</li>
</ul>
<div class="note" role="note" id="issue-container-generatedID-0"><div role="heading" class="note-title marker" id="h-note" aria-level="3"><span>Note</span></div><aside class="">
<p>
Although it is optional for any member to appear in a manifest, some
user agents might require one or more to be present to take full
advantage of the capabilities afforded by this specification.
</p>
</aside></div>
<section class="informative" id="examples"><div class="header-wrapper"><h3 id="x1-1-examples"><bdi class="secno">1.1 </bdi>
Examples
</h3><a class="self-link" href="#examples" aria-label="Permalink for Section 1.1"></a></div><p><em>This section is non-normative.</em></p>
<p>
This section shows how developers can make use of the various
features of this specification.
</p>
<section class="informative" id="typical-structure"><div class="header-wrapper"><h4 id="x1-1-1-typical-structure"><bdi class="secno">1.1.1 </bdi>
Typical structure
</h4><a class="self-link" href="#typical-structure" aria-label="Permalink for Section 1.1.1"></a></div><p><em>This section is non-normative.</em></p>
<p>
The following shows a typical <a href="#dfn-manifest" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-manifest-3">manifest</a>.
</p>
<div class="example" id="example-typical-manifest">
<div class="marker">
<a class="self-link" href="#example-typical-manifest">Example<bdi> 1</bdi></a><span class="example-title">: Typical manifest</span>
</div> <pre aria-busy="false"><code class="hljs json"><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"lang"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"en"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"dir"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"ltr"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Super Racer 3000"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"short_name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Racer3K"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"icons"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/lowres.webp"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"64x64"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"image/webp"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/lowres.png"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"64x64"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span> <span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/hd_hi"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"128x128"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">]</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"scope"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"id"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"superracer"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"start_url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/start.html"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"display"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"fullscreen"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"orientation"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"landscape"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"theme_color"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"aliceblue"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"background_color"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"red"</span>
<span class="hljs-punctuation">}</span></code></pre>
</div>
</section>
<section class="informative" id="using-a-link-element-to-link-to-a-manifest"><div class="header-wrapper"><h4 id="x1-1-2-using-a-link-element-to-link-to-a-manifest"><bdi class="secno">1.1.2 </bdi>
Using a <code>link</code> element to link to a manifest
</h4><a class="self-link" href="#using-a-link-element-to-link-to-a-manifest" aria-label="Permalink for Section 1.1.2"></a></div><p><em>This section is non-normative.</em></p>
<p>
The example also shows how to use the link type "manifest" and how
to use other <code><a data-link-type="element" data-type="element" href="https://html.spec.whatwg.org/multipage/semantics.html#meta" id="ref-for-index-term-meta-element-1">meta</a></code> and <code><a data-link-type="element" data-type="element" href="https://html.spec.whatwg.org/multipage/semantics.html#the-link-element" id="ref-for-index-term-link-element-1">link</a></code> elements to give the web
application a fallback name and set of icons.
</p>
<div class="example" id="example-linking-to-a-manifest">
<div class="marker">
<a class="self-link" href="#example-linking-to-a-manifest">Example<bdi> 2</bdi></a><span class="example-title">: Linking to a manifest</span>
</div> <pre aria-busy="false"><code class="hljs html"><span class="hljs-meta"><!doctype></span>
<span class="hljs-tag"><<span class="hljs-name">html</span>></span>
<span class="hljs-tag"><<span class="hljs-name">title</span>></span>Racer 3K<span class="hljs-tag"></<span class="hljs-name">title</span>></span>
<span class="hljs-comment"><!-- Startup configuration --></span>
<span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"manifest"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"manifest.webmanifest"</span>></span>
<span class="hljs-comment"><!-- Fallback application metadata for legacy browsers --></span>
<span class="hljs-tag"><<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"application-name"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"Racer3K"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"16x16 32x32 48x48"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"lo_def.ico"</span>></span>
<span class="hljs-tag"><<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"512x512"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"hi_def.png"</span>></span></code></pre>
</div>
<div class="note" role="note" id="issue-container-generatedID-1"><div role="heading" class="note-title marker" id="h-note-0" aria-level="5"><span>Note</span><span class="issue-label">: File extension: .webmanifest or .json?</span></div><aside class="">
The <abbr title="Internet Assigned Numbers Authority">IANA</abbr> <a href="https://www.iana.org/assignments/media-types/application/manifest+json">
registered</a> file extension for the manifest is <code>.webmanifest</code>.
Some web servers recognize this extension and transfer the file
using the standardized <a href="#dfn-application-manifest-media-type" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-application-manifest-media-type-1">application manifest media type</a>
(<a data-link-type="dfn|abstract-op" href="#dfn-application-manifest-json" class="internalDFN" id="ref-for-dfn-application-manifest-json-1"><code>application/manifest+json</code></a>). Developers can also choose a
different extension (e.g. <code>.json</code>) or none at all (e.g.
<code>/api/GetManifest</code>), but are encouraged to transfer the manifest
using the <a data-link-type="dfn|abstract-op" href="#dfn-application-manifest-json" class="internalDFN" id="ref-for-dfn-application-manifest-json-2"><code>application/manifest+json</code></a> <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://mimesniff.spec.whatwg.org/#mime-type" id="ref-for-index-term-mime-type-1">MIME type</a>, although
any <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://mimesniff.spec.whatwg.org/#json-mime-type" id="ref-for-index-term-json-mime-type-1">JSON MIME type</a> is ok.
</aside></div>
</section>
<section class="informative" id="declaring-multiple-icons"><div class="header-wrapper"><h4 id="x1-1-3-declaring-multiple-icons"><bdi class="secno">1.1.3 </bdi>
Declaring multiple icons
</h4><a class="self-link" href="#declaring-multiple-icons" aria-label="Permalink for Section 1.1.3"></a></div><p><em>This section is non-normative.</em></p>
<p>
In the following example, the developer has made the following
choices about the icons associated with the web application:
</p>
<ul>
<li>The developer has included two icons at the same size, but in
two different formats. One is explicitly marked as WebP through the
<code>type</code> member. If the user agent doesn't support WebP, it falls
back to the second icon of the same size. The <a data-type="dfn" href="https://mimesniff.spec.whatwg.org/#mime-type" id="ref-for-index-term-mime-type-2">MIME type</a> of
this icon can then be either determined via a HTTP header, or can
be <a data-lt="computed mime type" data-type="dfn" href="https://mimesniff.spec.whatwg.org/#computed-mime-type" id="ref-for-index-term-computed-mime-type-1">sniffed</a> by the user agent
once the first few bytes of the icon are received.
</li>
<li>The developer wants to use an SVG for greater than or equal to
257x257px. They've found that the SVG file looks too blurry at
small sizes, even on high-density screens. To deal with this
problem, the developer includes an SVG icon that is only used when
the dimensions are at least 257px. Otherwise, the user agent uses
the ICO file (hd_hi.ico), which includes a gamut of raster icons
individually tailored for small display sizes.
</li>
</ul>
<div class="example" id="example-multiple-icons">
<div class="marker">
<a class="self-link" href="#example-multiple-icons">Example<bdi> 3</bdi></a><span class="example-title">: Multiple icons</span>
</div> <pre aria-busy="false"><code class="hljs json"><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"icons"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/lowres.webp"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"48x48"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"image/webp"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/lowres"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"48x48"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/hd_hi.ico"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"72x72 96x96 128x128 256x256"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"icon/hd_hi.svg"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"sizes"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"257x257"</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span></code></pre>
</div>
</section>
<section class="informative" id="creating-shortcuts"><div class="header-wrapper"><h4 id="x1-1-4-creating-shortcuts"><bdi class="secno">1.1.4 </bdi>
Creating shortcuts
</h4><a class="self-link" href="#creating-shortcuts" aria-label="Permalink for Section 1.1.4"></a></div><p><em>This section is non-normative.</em></p>
<p>
In the following example, the developer has included two shortcuts.
Assuming the manifest's URL is
<samp>https://example.com/manifest.webmanifest</samp>:
</p>
<ul>
<li>The first shortcut would be displayed with the text "Play
Later". If the operating system supports icons for context menu
items and it also supports SVG images for that purpose, the user
agent would present
<samp>https://example.com/icons/play-later.svg</samp> next to the
text. When launched, the user agent would instantiate a new
<a data-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-browsing-context" id="ref-for-index-term-top-level-browsing-context-1">top-level browsing context</a> and navigate to
<samp>https://example.com/play-later</samp>.
</li>
<li>The second shortcut would be displayed with the text
"Subscriptions". When launched, the user agent would instantiate a
new <a data-type="dfn" href="https://html.spec.whatwg.org/multipage/document-sequences.html#top-level-browsing-context" id="ref-for-index-term-top-level-browsing-context-2">top-level browsing context</a> and navigate to
<samp>https://example.com/subscriptions?sort=desc</samp>.
</li>
</ul>
<div class="example" id="example-adding-shortcuts">
<div class="marker">
<a class="self-link" href="#example-adding-shortcuts">Example<bdi> 4</bdi></a><span class="example-title">: Adding shortcuts</span>
</div> <pre aria-busy="false"><code class="hljs json"><span class="hljs-punctuation">{</span>
<span class="hljs-attr">"shortcuts"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Play Later"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"View the list of podcasts you saved for later"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/play-later"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"icons"</span><span class="hljs-punctuation">:</span> <span class="hljs-punctuation">[</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"src"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/icons/play-later.svg"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"type"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"image/svg+xml"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span><span class="hljs-punctuation">,</span>
<span class="hljs-punctuation">{</span>
<span class="hljs-attr">"name"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"Subscriptions"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"description"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"View the list of podcasts you listen to"</span><span class="hljs-punctuation">,</span>
<span class="hljs-attr">"url"</span><span class="hljs-punctuation">:</span> <span class="hljs-string">"/subscriptions?sort=desc"</span>
<span class="hljs-punctuation">}</span>
<span class="hljs-punctuation">]</span>
<span class="hljs-punctuation">}</span></code></pre>
</div>
</section>
<section class="informative" id="understanding-scope"><div class="header-wrapper"><h4 id="x1-1-5-understanding-scope"><bdi class="secno">1.1.5 </bdi>
Understanding "scope"
</h4><a class="self-link" href="#understanding-scope" aria-label="Permalink for Section 1.1.5"></a></div><p><em>This section is non-normative.</em></p>
<p>
The <a data-link-type="dfn|abstract-op" href="#dfn-scope" class="internalDFN" id="ref-for-dfn-scope-2"><code>scope</code></a> member tells the browser which documents are
part of a web application, and which are not - and hence, to which
set of web pages the manifest is "<a data-link-type="dfn|abstract-op" href="#dfn-apply" class="internalDFN" id="ref-for-dfn-apply-1">applied</a>" when the user
navigates around a web site.
</p>
<p>
For example, <code>{"scope": "/"}</code> means that the manifest applies to
every document in an origin. On the other hand, <code>{"scope":
"/racer/"}</code> means that only documents within the path "/racer/" are
<a data-link-type="dfn|abstract-op" href="#dfn-within-scope" class="internalDFN" id="ref-for-dfn-within-scope-1">within scope</a>: so "/racer/race1.html", "/racer/race2.html",
etc. would all be <a data-link-type="dfn|abstract-op" href="#dfn-within-scope" class="internalDFN" id="ref-for-dfn-within-scope-2">within scope</a>, but "/elsewhere/" and
anything at the root "/" would be "out of scope" and the manifest
wouldn't apply to documents in those paths. Only one scope path is
supported. See <a href="#nav-scope" data-matched-text="[[[#nav-scope]]]" class="sec-ref"><bdi class="secno">5. </bdi>
Navigation scope</a> for the technical details.
</p>
<p>
<a data-link-type="dfn|abstract-op" href="#dfn-apply" class="internalDFN" id="ref-for-dfn-apply-2">Applying</a> a manifest means that any members that affect
presentation found in the manifest will come into effect, such as
display "fullscreen", or applying a particular screen orientation.
As long as the application is navigated to URLs that are
<a data-link-type="dfn|abstract-op" href="#dfn-within-scope" class="internalDFN" id="ref-for-dfn-within-scope-3">within scope</a>, the browser will continue to apply the
manifest. However, navigating the web applications "out of scope"
will cause the manifest to no longer be applied, and the browser
will apply its own defaults. This will cause, for example, the
application to no longer be displayed in fullscreen, and instead be
displayed as a regular web page in a browser tab. It's left up to
implementers to decide how to deal with web pages being navigated
in and out of scope. See <a href="#applying" data-matched-text="[[[#applying]]]" class="sec-ref"><bdi class="secno">1.16.5 </bdi>
Applying the manifest</a> for the technical details.
</p>
<p>
Finally, as it's possible that a user can install a web application
from any document within an origin, it's good practice to always
declare a <a data-link-type="dfn|abstract-op" href="#dfn-scope" class="internalDFN" id="ref-for-dfn-scope-3"><code>scope</code></a> member in a manifest. If the
<a data-link-type="dfn|abstract-op" href="#dfn-scope" class="internalDFN" id="ref-for-dfn-scope-4"><code>scope</code></a> member is missing from the manifest, then the
path of the <a data-link-type="dfn|abstract-op" href="#dfn-start_url" class="internalDFN" id="ref-for-dfn-start_url-2"><code>start_url</code></a> member is used as a fallback.
And if the <a data-link-type="dfn|abstract-op" href="#dfn-start_url" class="internalDFN" id="ref-for-dfn-start_url-3"><code>start_url</code></a> member is also missing, then the
document URL from which the web application is installed gets used
as the scope. To be sure you don't get any unexpected navigation
behavior, always include a <a data-link-type="dfn|abstract-op" href="#dfn-scope" class="internalDFN" id="ref-for-dfn-scope-5"><code>scope</code></a> member preferably set
to <code>"/"</code>.
</p>
</section>
</section>
<section id="dir-member"><div class="header-wrapper"><h3 id="x1-2-dir-member"><bdi class="secno">1.2 </bdi>
<code>dir</code> member
</h3><a class="self-link" href="#dir-member" aria-label="Permalink for Section 1.2"></a></div>
<p>
The <a data-link-type="dfn|abstract-op" href="#dfn-manifest" class="internalDFN" id="ref-for-dfn-manifest-4">manifest's</a> <code><dfn data-export="" data-dfn-for="manifest" id="dfn-dir" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">dir</dfn></code> member specifies the <dfn id="dfn-default-direction" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">default
direction</dfn> for the <a data-link-type="dfn|abstract-op" href="#dfn-localizable-member" class="internalDFN" id="ref-for-dfn-localizable-member-1">localizable members</a> of the <a data-link-type="dfn|abstract-op" href="#dfn-manifest" class="internalDFN" id="ref-for-dfn-manifest-5">manifest</a>.
The <a data-link-type="dfn|abstract-op" href="#dfn-dir" class="internalDFN" id="ref-for-dfn-dir-2"><code>dir</code></a> member's value can be set to a
<a data-link-type="dfn|abstract-op" href="#dfn-text-directions" class="internalDFN" id="ref-for-dfn-text-directions-1">text-direction</a>.
</p>
<p>
The <dfn data-plurals="text-direction" id="dfn-text-directions" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">text-directions</dfn> are the following, implying that the
value of the <a data-link-type="dfn|abstract-op" href="#dfn-localizable-member" class="internalDFN" id="ref-for-dfn-localizable-member-2">localizable members</a> is by default:
</p>
<dl>
<dt>
"<dfn data-dfn-for="text-direction" id="dfn-ltr" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">ltr</dfn>"
</dt>
<dd>
Left-to-right text.
</dd>
<dt>
"<dfn data-dfn-for="text-direction" id="dfn-rtl" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">rtl</dfn>"
</dt>
<dd>
Right-to-left text.
</dd>
<dt>
"<dfn data-dfn-for="text-direction" id="dfn-auto" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">auto</dfn>" (default)
</dt>
<dd>
Text direction is unknown. The user agent should use heuristics to
estimate the display of the text, for example the first-strong
algorithm as described in [<cite><a class="bibref" data-link-type="biblio" href="#bib-uax9" title="Unicode Bidirectional Algorithm">UAX9</a></cite>].
</dd>
</dl>
<p>
The <dfn id="dfn-text-direction-list" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">text-direction list</dfn> is the <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#list" id="ref-for-index-term-list-1">list</a> «
"<a data-link-type="dfn|abstract-op" href="#dfn-ltr" class="internalDFN" id="ref-for-dfn-ltr-1">ltr</a>", "<a data-link-type="dfn|abstract-op" href="#dfn-rtl" class="internalDFN" id="ref-for-dfn-rtl-1">rtl</a>",
"<a data-link-type="dfn|abstract-op" href="#dfn-auto" class="internalDFN" id="ref-for-dfn-auto-1">auto</a>" ».
</p>
<p>
To <dfn id="dfn-process-the-dir-member" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">process the <code>dir</code> member</dfn>, given <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-ordered-map-1">ordered map</a>
<var data-type="ordered map">json</var> and <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-ordered-map-2">ordered map</a> <var data-type="ordered map">manifest</var>:
</p>
<ol class="algorithm">
<li>Set <var data-type="ordered map">manifest</var>["dir"] to "auto".
</li>
<li>If <var data-type="ordered map">json</var>["dir"] doesn't <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-index-term-exist-for-map-1">exist</a> or if <var data-type="ordered map">json</var>["dir"] is not
a <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-index-term-string-1">string</a>, return.
</li>
<li><a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace" id="ref-for-index-term-strip-leading-and-trailing-ascii-whitespace-1">Strip leading and trailing ASCII whitespace</a> from
<var data-type="ordered map">json</var>["dir"].
</li>
<li><a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#ascii-lowercase" id="ref-for-index-term-ascii-lowercase-1">ASCII lowercase</a> <var data-type="ordered map">json</var>["dir"].
</li>
<li>If <a data-link-type="dfn|abstract-op" href="#dfn-text-direction-list" class="internalDFN" id="ref-for-dfn-text-direction-list-1">text-direction list</a> doesn't <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#list-contain" id="ref-for-index-term-contain-for-list-1">contain</a>
<var data-type="ordered map">json</var>["dir"], return.
</li>
<li>Set <var data-type="ordered map">manifest</var>["dir"] to <var data-type="ordered map">json</var>["dir"].
</li>
</ol>
</section>
<section id="lang-member"><div class="header-wrapper"><h3 id="x1-3-lang-member"><bdi class="secno">1.3 </bdi>
<code>lang</code> member
</h3><a class="self-link" href="#lang-member" aria-label="Permalink for Section 1.3"></a></div>
<p>
The <a data-link-type="dfn|abstract-op" href="#dfn-manifest" class="internalDFN" id="ref-for-dfn-manifest-6">manifest's</a> <code><dfn data-export="" data-dfn-for="manifest" id="dfn-lang" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">lang</dfn></code> member is a <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-index-term-string-2">string</a> in the form of a
<a data-link-type="dfn|abstract-op" href="#dfn-language-tag" class="internalDFN" id="ref-for-dfn-language-tag-1">language tag</a> that specifies the language for the values of the
manifest's <a data-link-type="dfn|abstract-op" href="#dfn-localizable-member" class="internalDFN" id="ref-for-dfn-localizable-member-3">localizable members</a>. If the <code>lang</code> member is not
specified, the language is treated as unknown.
</p>
<div class="note" role="note" id="issue-container-generatedID-2"><div role="heading" class="note-title marker" id="h-note-1" aria-level="4"><span>Note</span></div><p class="">
Specifying the language improves the user experience by helping user
agents select the most appropriate processing or resources, such as
fonts, styling, hyphenation, or text-to-speech voices for
accessibility.
</p></div>
<p>
A <dfn id="dfn-language-tag" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">language tag</dfn> is a <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-index-term-string-3">string</a> that matches the production
of a well-formed <code>Language-Tag</code> defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-bcp47" title="Tags for Identifying Languages">BCP47</a></cite>].
</p>
<div class="note" role="note" id="issue-container-generatedID-3"><div role="heading" class="note-title marker" id="h-note-2" aria-level="4"><span>Note</span></div><p class="">
Language tags are case-insensitive. Examples of language tags include
'<code>fr</code>' (French), '<code>en-AU</code>' (English as spoken in Australia), or
'<code>zh-Hans-CN</code>' (Chinese as written in the Simplified Han script as
spoken in China).
</p></div>
<p>
To <dfn id="dfn-process-the-lang-member" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">process the <code>lang</code> member</dfn>, given <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-ordered-map-3">ordered map</a>
<var data-type="ordered map">json</var> and <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#ordered-map" id="ref-for-index-term-ordered-map-4">ordered map</a> <var data-type="ordered map">manifest</var>:
</p>
<ol class="algorithm">
<li>If <var data-type="ordered map">json</var>["lang"] doesn't <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-exists" id="ref-for-index-term-exist-for-map-2">exist</a> or if <var data-type="ordered map">json</var>["lang"] is
not a <a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-index-term-string-4">string</a>, return.
</li>
<li><a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace" id="ref-for-index-term-strip-leading-and-trailing-ascii-whitespace-2">Strip leading and trailing ASCII whitespace</a> from
<var data-type="ordered map">json</var>["lang"].
</li>
<li>If calling <a href="https://tc39.es/ecma402/#sec-isstructurallyvalidlanguagetag" id="ref-for-index-term-isstructurallyvalidlanguagetag-1">IsStructurallyValidLanguageTag</a>
with <var data-type="ordered map">json</var>["lang"] returns <code>false</code>, return.
</li>
<li><a data-link-type="dfn|abstract-op" data-type="dfn" href="https://infra.spec.whatwg.org/#map-set" id="ref-for-index-term-set-for-map-1">Set</a> <var data-type="ordered map">manifest</var>["lang"] to the result of calling the
<a href="https://tc39.es/ecma402/#sec-canonicalizeunicodelocaleid" id="ref-for-index-term-canonicalizeunicodelocaleid-1">CanonicalizeUnicodeLocaleId</a>
abstract operation with <var data-type="ordered map">json</var>["lang"].
</li>
</ol>
</section>
<aside class="mdn"><details>
<summary aria-label="Expand MDN details for name"><span>MDN</span><span> </span></summary>
<a title="The name member is a string that represents the name of the web application as it is usually displayed to the user (e.g., amongst a list of other applications, or as a label for an icon). name is directionality-capable, which means it can be displayed left-to-right or right-to-left based on the values of the dir and lang manifest members." href="https://developer.mozilla.org/en-US/docs/Web/Manifest/name">name</a>
<table>
<tr class="chrome yes">
<td>Chrome</td>
<td>39+</td>
</tr><tr class="chrome_android unknown">
<td>Chrome Android</td>
<td>?</td>
</tr><tr class="edge unknown">
<td>Edge</td>
<td>?</td>
</tr><tr class="edge_mobile unknown">
<td>Edge Mobile</td>
<td>?</td>
</tr><tr class="firefox unknown">
<td>Firefox</td>
<td>?</td>
</tr><tr class="firefox_android no">
<td>Firefox Android</td>
<td>No</td>
</tr><tr class="opera unknown">
<td>Opera</td>
<td>?</td>
</tr><tr class="opera_android unknown">
<td>Opera Android</td>
<td>?</td>
</tr><tr class="safari unknown">
<td>Safari</td>
<td>?</td>
</tr><tr class="safari_ios yes">
<td>Safari iOS</td>
<td>11.3+</td>
</tr><tr class="samsunginternet_android unknown">
<td>Samsung Internet</td>
<td>?</td>