355
355
[Exposed=(Window,Worker)]
356
356
interface PerformanceResourceTiming : PerformanceEntry {
357
357
readonly attribute DOMString initiatorType;
358
+ readonly attribute DOMString deliveryType;
358
359
readonly attribute ByteString nextHopProtocol;
359
360
readonly attribute DOMHighResTimeStamp workerStart;
360
361
readonly attribute DOMHighResTimeStamp redirectStart;
@@ -381,6 +382,11 @@ <h3>
381
382
< a data-dfn-for ="PerformanceResourceTiming "> < dfn > initiator
382
383
type</ dfn > </ a > .
383
384
</ p >
385
+ < p >
386
+ A < a > PerformanceResourceTiming</ a > has an associated DOMString
387
+ < a data-dfn-for ="PerformanceResourceTiming "> < dfn > delivery
388
+ type</ dfn > </ a > .
389
+ </ p >
384
390
< p >
385
391
A < a > PerformanceResourceTiming</ a > has an associated DOMString
386
392
< a data-dfn-for ="PerformanceResourceTiming "> < dfn > requested
@@ -552,6 +558,32 @@ <h3>
552
558
The setting of `initiatorType` is done at the different places where
553
559
a resource timing entry is reported, such as the [=fetch=] standard.
554
560
</ p >
561
+ < p data-dfn-for ="PerformanceResourceTiming ">
562
+ < dfn > deliveryType</ dfn > getter steps are to return the < a data-for =
563
+ "PerformanceResourceTiming "> delivery type</ a > for < a > this</ a > .
564
+ </ p >
565
+ < div class ='note '>
566
+ < p >
567
+ `deliveryType` returns one of the following values:
568
+ </ p >
569
+ < ul >
570
+ < li >
571
+ < code > "cache"</ code > , if the < a data-for =
572
+ "PerformanceResourceTiming "> cache mode</ a > is not the empty
573
+ string.
574
+ </ li >
575
+ < li >
576
+ the empty string < code > ""</ code > , if none of the above conditions
577
+ match.
578
+ </ li >
579
+ </ ul >
580
+
581
+ < p >
582
+ This is expected to be expanded by future updates to this
583
+ specification, e.g. to describe consuming preloaded resources and
584
+ prefetched navigation requests.
585
+ </ p >
586
+ </ div >
555
587
< p data-dfn-for ="PerformanceResourceTiming ">
556
588
The < dfn > workerStart</ dfn > getter steps are to < a > convert fetch
557
589
timestamp</ a > for < a > this</ a > 's < a data-for =
@@ -1030,7 +1062,8 @@ <h4>
1030
1062
< p >
1031
1063
The user agent MAY still enforce cross-origin restrictions and set
1032
1064
transferSize, encodedBodySize, and decodedBodySize attributes to
1033
- zero, even with Timing-Allow-Origin HTTP response header fields.
1065
+ zero, even with Timing-Allow-Origin HTTP response header fields. If
1066
+ it does, it MAY also set deliveryType to "".
1034
1067
</ p >
1035
1068
< p >
1036
1069
The < a > Timing-Allow-Origin</ a > headers are processed in
@@ -1130,8 +1163,9 @@ <h2>
1130
1163
To < dfn data-export =""> mark resource timing</ dfn > given a [=/fetch
1131
1164
timing info=] |timingInfo|, a DOMString |requestedURL|, a DOMString
1132
1165
|initiatorType| a < a > global object</ a > |global|, a string
1133
- |cacheMode|, a [=/response body info=] |bodyInfo|, and a
1166
+ |cacheMode|, a [=/response body info=] |bodyInfo|, a
1134
1167
< a data-cite ="FETCH#concept-status "> status</ a > |responseStatus|,
1168
+ and an optional [=string=] |deliveryType| (by default, the empty string),
1135
1169
perform the following steps:
1136
1170
</ p >
1137
1171
< ol >
@@ -1141,7 +1175,7 @@ <h2>
1141
1175
< li >
1142
1176
< a > Setup the resource timing entry</ a > for |entry|, given
1143
1177
|initiatorType|, |requestedURL|, |timingInfo|, |cacheMode|,
1144
- |bodyInfo| and |responseStatus |.
1178
+ |bodyInfo|, |responseStatus|, and |deliveryType |.
1145
1179
</ li >
1146
1180
< li >
1147
1181
< a data-cite =
@@ -1159,8 +1193,9 @@ <h2>
1159
1193
< a > PerformanceResourceTiming</ a > |entry| given DOMString
1160
1194
|initiatorType|, DOMString |requestedURL|, [=/fetch timing info=]
1161
1195
|timingInfo|, a DOMString |cacheMode|, a [=response body info=]
1162
- |bodyInfo|, and a < a data-cite ="FETCH#concept-status "> status</ a >
1163
- |responseStatus|, perform the following steps:
1196
+ |bodyInfo|, a < a data-cite ="FETCH#concept-status "> status</ a >
1197
+ |responseStatus|, and an optional DOMString |deliveryType| (by
1198
+ default, the empty string), perform the following steps:
1164
1199
</ p >
1165
1200
< ol >
1166
1201
< li > Assert that |cacheMode| is the empty string,
@@ -1184,6 +1219,12 @@ <h2>
1184
1219
< li > Set |entry|'s < a data-for ="PerformanceResourceTiming "> response
1185
1220
status</ a > to |responseStatus|.
1186
1221
</ li >
1222
+ < li > If |deliveryType| is the empty string and |cacheMode| is not,
1223
+ then set |deliveryType| to "< code > cache</ code > ".
1224
+ </ li >
1225
+ < li > Set |entry|'s < a data-for ="PerformanceResourceTiming "> delivery
1226
+ type</ a > to |deliveryType|.
1227
+ </ li >
1187
1228
</ ol >
1188
1229
< p >
1189
1230
To < dfn > convert fetch timestamp</ dfn > given {{DOMHighResTimeStamp}}
0 commit comments