@@ -198,9 +198,40 @@ confusion with the use of <i>media type</i> as described in <cite>Media Queries<
198
198
<p> A <a>MIME type</a> is <dfn export>supported by the user agent</dfn> if the user agent has the
199
199
capability to interpret a <a>resource</a> of that <a>MIME type</a> and present it to the user.
200
200
201
- <p class=XXX> This needs more work . See
201
+ <p class=XXX> Ideally this would be more precise . See
202
202
<a href=https://github.com/w3c/preload/issues/113>w3c/preload #113</a> .
203
203
204
+ <div algorithm>
205
+ <p> To <dfn export>minimize a supported MIME type</dfn> given a <a>MIME type</a> <var> mimeType</var> ,
206
+ run these steps. They return an <a>ASCII string</a> .
207
+
208
+ <ol>
209
+ <li><p> If <var> mimeType</var> is a <a>JavaScript MIME type</a> , then return
210
+ "<code> text/javascript</code> ".
211
+
212
+ <li><p> If <var> mimeType</var> is a <a>JSON MIME type</a> , then return
213
+ "<code> application/json</code> ".
214
+
215
+ <li>
216
+ <p> If <var> mimeType</var> 's <a for="MIME type">essence</a> is "<code> image/svg+xml</code> ", then
217
+ return "<code> image/svg+xml</code> ".
218
+
219
+ <p class=note> SVG is worth distinguishing from other <a>XML MIME types</a> .
220
+
221
+ <li><p> If <var> mimeType</var> is an <a>XML MIME type</a> , then return
222
+ "<code> application/xml</code> ".
223
+
224
+ <li><p> If <var> mimeType</var> is <a>supported by the user agent</a> , then return
225
+ <var> mimeType</var> 's <a for="MIME type">essence</a> .
226
+
227
+ <li><p> Return the empty string.
228
+ </ol>
229
+
230
+ <p class=note> The goal of this algorithm is to allow the caller to distinguish MIME types with
231
+ different processing models, such as those for GIF and PNG, but otherwise provide as little
232
+ information as possible.
233
+ </div>
234
+
204
235
205
236
<h3 id=mime-type-writing>MIME type writing</h3>
206
237
0 commit comments