Skip to content

Update link rel preload to reflect browser support#32740

Merged
sideshowbarker merged 2 commits intomdn:mainfrom
tunetheweb:link-preload-types
Mar 19, 2024
Merged

Update link rel preload to reflect browser support#32740
sideshowbarker merged 2 commits intomdn:mainfrom
tunetheweb:link-preload-types

Conversation

@tunetheweb
Copy link
Copy Markdown
Contributor

@tunetheweb tunetheweb commented Mar 19, 2024

Description

<link rel=preload> only works with certain as types currently so this section is wrong:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload#what_types_of_content_can_be_preloaded

See example here: https://resource-loading-examples.glitch.me/preload-types.html
(tested in Chrome 123, Firefox 123, and Safari 17.4)

<video> is also NOT one of the as types supported by any browser so this section is also wrong as the example doesn't work:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload#including_a_mime_type
It should be replaced with image type instead

Update the link rel preload doc to reflect browser support.

Motivation

Have received several requests as to why this is not supported in Chrome. But it's not supported in ANY browser.

Additional details

You can test yourself with this example here: https://resource-loading-examples.glitch.me/preload-types.html

Related issues and pull requests

Also raised a spec discussion here:
whatwg/html#8332 (comment)

And a caniuse request here: Fyrd/caniuse#7006

Will raise a BCD update next and update this note. (Edit: raised mdn/browser-compat-data#22658)

@tunetheweb tunetheweb requested a review from a team as a code owner March 19, 2024 11:27
@tunetheweb tunetheweb requested review from chrisdavidmills and removed request for a team March 19, 2024 11:27
@github-actions github-actions Bot added Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed labels Mar 19, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 19, 2024

Preview URLs

External URLs (2)

URL: /en-US/docs/Web/HTML/Attributes/rel/preload
Title: rel=preload

(comment last updated: 2024-03-19 11:29:16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:HTML Hypertext Markup Language docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants