gatsby: Fix "resource preloaded but not used" warning in Chrome
I am keep getting the warning message at chrome
“The resource <URL> was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.”
The resource https://www.selectchu.com/component---src-pages-index-js-e3609fd82d452154463c.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/roboto/v19/KFOmCnqEu92Fr1Mu4mxK.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/app-97f530f3e5a7162dfd06.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/webpack-runtime-c108f36890d85c65bb96.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/roboto/v19/KFOlCnqEu92Fr1MmWUlfBBc4.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/notosanskr/v11/Pby7FmXiEBPT4ITbgNA5CgmOalv45bIR.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/opensans/v16/mem8YaGs126MiZpBA-UFVZ0b.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/opensans/v16/mem5YaGs126MiZpBA-UN7rgOUuhp.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/styles-c23128a881c72b69f101.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/google-fonts/s/notosanskr/v11/PbykFmXiEBPT4ITbgNA5CgmG237t.woff2 was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
The resource https://www.selectchu.com/1-41a7a9b6ed6c2c325059.js was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
what can be the main problem? and how to solve it?
these are plugins i use
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-plugin-styled-components`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sass`,
`gatsby-plugin-sharp`,
`gatsby-plugin-transition-link`,
{
resolve: `gatsby-plugin-prefetch-google-fonts`,
options: {
fonts: [
{
family: `Noto Sans KR`,
subsets: [`latin`, 'korean'],
variants: [`400`, `700`]
},
{
family: `Open Sans`,
variants: [`400`, `700`]
},
{
family: `Roboto`,
variants: [`400`, `700`]
},
],
},
},
'gatsby-transformer-remark',
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 31 (7 by maintainers)
This is definitely still an issue.
This warning is happening on my site built w/ Gatsbty because the
<link rel="preload" />tag is missingcrossorigin="anonymous". I get 8 warnings a few seconds after the page loads. Looking at the source shows the warnings are related to<link>element missingcrossorigin="anonymous".The issue is that somehow
crossorigin=""is added to the links. This is a bug. We’ll investigate it.Thanks a lot for reporting this! 💪 💜
Any word on if this was fixed I upgraded to gatsby v5 and am still having this issue?
Thanks! hope the warning goes away soon. 😃
same issue but using next js
I see same issue (don’t understand why this issue closed?)
I got those warning on prod site. Not sure where/how to fix…and mine aren’t related to fonts.
@hogyster keep an eye on #14608, I’m working on a plugin that will add
<link preload>to each route as needed for each font used on that page. It allows thecrossoriginattribute to be configured per-route if needed!Same issue here
Going nuts.
work it.
Thats’s the reason to close the issue? This is not only WordPress related. I keep getting those unhelpful warnings on many sites, cluttering my devtools without adding any value. Still reproducible with the latest Chromium on Linux.
Is there a Chromium bug ticket as a follow-up maybe?
I have the same issues as @kimbaudi mentioned above did you find a solution to make those warnings go away ?
Any updates on this ?