@@ -138,15 +138,19 @@ allow for different storage policies. And lastly, a <a>storage bucket</a> consis
138
138
<h3 id=storage-endpoints>Storage endpoints</h3>
139
139
140
140
<p> A <dfn export>storage endpoint</dfn> is a <a lt="local storage">local</a> or
141
- <a>session storage</a> API that uses the infrastructure defined by this standard to keep track of
142
- its storage needs.
141
+ <a>session storage</a> API that uses the infrastructure defined by this standard, most notably
142
+ <a for=/>storage bottles</a> , to keep track of its storage needs.
143
143
144
144
<p> A <a>storage endpoint</a> has an <dfn for="storage endpoint">identifier</dfn> , which is a
145
145
<a>storage identifier</a> .
146
146
147
147
<p> A <a>storage endpoint</a> also has <dfn for="storage endpoint">types</dfn> , which is a
148
148
<a for=/>set</a> of <a>storage types</a> .
149
149
150
+ <p> A <a>storage endpoint</a> also has a <dfn for="storage endpoint">quota</dfn> , which is null or a
151
+ number representing a recommended <a for="storage bottle">quota</a> (in bytes) for all
152
+ <a for=/>storage bottles</a> corresponding to this <a>storage endpoint</a> .
153
+
150
154
<p> A <dfn>storage identifier</dfn> is an <a for=/>ASCII string</a> .
151
155
152
156
<p> A <dfn>storage type</dfn> is "<code> local</code> " or "<code> session</code> ".
@@ -160,23 +164,29 @@ defined by the following table:
160
164
161
165
<table>
162
166
<tr>
163
- <th> <a>Storage identifier</a>
164
- <th> <a>Storage types</a>
167
+ <th> <a for="storage endpoint">Identifier</a>
168
+ <th> <a for="storage endpoint">Type</a>
169
+ <th> <a for="storage endpoint">Quota</a>
165
170
<tr>
166
171
<td> "<code> caches</code> "
167
172
<td> « "<code> local</code> " »
173
+ <td> null
168
174
<tr>
169
175
<td> "<code> indexedDB</code> "
170
176
<td> « "<code> local</code> " »
177
+ <td> null
171
178
<tr>
172
179
<td> "<code> localStorage</code> "
173
180
<td> « "<code> local</code> " »
181
+ <td> 5 × 2<sup> 20</sup> (i.e., 5 mebibytes)
174
182
<tr>
175
183
<td> "<code> serviceWorkerRegistrations</code> "
176
184
<td> « "<code> local</code> " »
185
+ <td> null
177
186
<tr>
178
187
<td> "<code> sessionStorage</code> "
179
188
<td> « "<code> session</code> " »
189
+ <td> 5 × 2<sup> 20</sup> (i.e., 5 mebibytes)
180
190
</table>
181
191
182
192
<p class=note> As mentioned, standards can use these <a>storage identifiers</a> with
@@ -300,7 +310,8 @@ steps:
300
310
<li><p> <a for=set>For each</a> <var> endpoint</var> of <a>registered storage endpoints</a> whose
301
311
<a for="storage endpoint">types</a> <a for=set>contain</a> <var> type</var> , set <var> bucket</var> 's
302
312
<a>bottle map</a> [<var>endpoint</var>'s <a for="storage endpoint">identifier</a>] to a new
303
- <a>storage bottle</a> .
313
+ <a>storage bottle</a> whose <a for="storage bottle">quota</a> is <var> endpoint</var> 's
314
+ <a for="storage endpoint">quota</a> .
304
315
305
316
<li><p> Return <var> bucket</var> .
306
317
</ol>
@@ -312,7 +323,10 @@ steps:
312
323
<a>storage endpoint</a> . A <a>storage bottle</a> has a <dfn for="storage bottle">map</dfn> , which is
313
324
initially an empty <a for=/>map</a> . A <a>storage bottle</a> also has a
314
325
<dfn for="storage bottle">proxy map reference set</dfn> , which is initially an empty
315
- <a for=/>set</a> .
326
+ <a for=/>set</a> . A <a>storage bottle</a> also has a <dfn for="storage bottle">quota</dfn> , which is
327
+ null or a number representing a conservative estimate of the total amount of bytes it can hold. Null
328
+ indicates the lack of a limit. <span class=note> It is still bound by the <a>storage quota</a> of its
329
+ encompassing <a for=/>storage shelf</a> .
316
330
317
331
<p> A <a>storage bottle</a> 's <a for="storage bottle">map</a> is where the actual data meant to be
318
332
stored lives. User agents are expected to store this data, and make it available across <a>agent</a>
@@ -427,7 +441,7 @@ deduplication, compression, and other techniques that obscure exactly how much b
427
441
<a>storage shelf</a> uses.
428
442
429
443
<p> The <dfn export>storage quota</dfn> of a <a>storage shelf</a> is a conservative estimate of the
430
- amount of bytes available to it . This amount should be less than the total available storage space
444
+ total amount of bytes it can hold . This amount should be less than the total available storage space
431
445
on the device to give users some wiggle room.
432
446
433
447
<p class=note> User agents are strongly encouraged to consider navigation frequency, recency of
0 commit comments