KEMBAR78
Only preload resources with matching type/as attributes by noamr · Pull Request #7851 · whatwg/html · GitHub
Skip to content

Conversation

@noamr
Copy link
Collaborator

@noamr noamr commented Apr 24, 2022

Closes w3c/preload#113

(See WHATWG Working Mode: Changes for more details.)


/infrastructure.html ( diff )
/links.html ( diff )
/semantics.html ( diff )

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch

source Outdated

<ul class="brief">
<li><p><var>destination</var> is <code data-x="">audio</code> or <code data-x="">video</code>,
and <var>mimeTypeRecord</var> is an <span>audio or video MIME type</span></p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We allow using as=audio type=video/blah?? That's a bit surprising... is it tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's expected since audio elements can play video tracks and vice versa.
I wasn't able to test media preloading reliably yet though, due to range responses, regardless of type verification.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would feel more comfortable merging this if we had some confirmation (e.g. by codebase inspection or via @annevk testimony, if we can't manage WPTs) that this was the desired behavior.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inspected the Chromium and WebKit code bases and this is based on that inspection.

@domenic domenic merged commit c795467 into whatwg:main Apr 26, 2022
@noamr noamr deleted the preload-type branch April 26, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Parsable MIME type is going away

2 participants