-
Notifications
You must be signed in to change notification settings - Fork 47.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: ReactDOM.preload()
#27200
Labels
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Comments
styfle
added
the
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
label
Aug 7, 2023
1 task
gnoff
added a commit
that referenced
this issue
Aug 7, 2023
Fixes: #27200 preloads for images that appear before the viewport meta may be loaded twice because the proper device image information is not used with the preload but is with the image itself. The viewport meta should be emitted earlier than all preloads to avoid this. this change moves the queue for the viewport meta to preconnects which already has the right priority for this tag
github-actions bot
pushed a commit
that referenced
this issue
Aug 7, 2023
Fixes: #27200 preloads for images that appear before the viewport meta may be loaded twice because the proper device image information is not used with the preload but is with the image itself. The viewport meta should be emitted earlier than all preloads to avoid this. this change moves the queue for the viewport meta to preconnects which already has the right priority for this tag DiffTrain build for [ea17cc1](ea17cc1)
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this issue
Apr 15, 2024
Fixes: facebook#27200 preloads for images that appear before the viewport meta may be loaded twice because the proper device image information is not used with the preload but is with the image itself. The viewport meta should be emitted earlier than all preloads to avoid this. this change moves the queue for the viewport meta to preconnects which already has the right priority for this tag
bigfootjon
pushed a commit
that referenced
this issue
Apr 18, 2024
Fixes: #27200 preloads for images that appear before the viewport meta may be loaded twice because the proper device image information is not used with the preload but is with the image itself. The viewport meta should be emitted earlier than all preloads to avoid this. this change moves the queue for the viewport meta to preconnects which already has the right priority for this tag DiffTrain build for commit ea17cc1.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
React version:
18.3.0-canary-9377e1010-20230712
Steps To Reproduce
<meta name="viewport" content="width=device-width, initial-scale=1" />
inside of<head>
ReactDOM.preload('/img.png', { as: 'image' })
The current behavior
The
<link>
generated from the preload is before the<meta>
for the viewport.The expected behavior
The
<link>
should come after the<meta>
for the viewport.Related
next/image
withpriority
in App Router causes double fetch on mobile vercel/next.js#53574cc @gnoff
The text was updated successfully, but these errors were encountered: