Closed hogyster closed 5 years ago
Sorry to hear you are having an issue! Could you try if upgrading Gatsby fixes this?
Sorry to hear you are having an issue! Could you try if upgrading Gatsby fixes this?
Have upgraded to the latest gatsby and the warning still come up :(
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! :muscle: :purple_heart:
@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 the crossorigin
attribute to be configured per-route if needed!
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! 💪 💜
Thanks! hope the warning goes away soon. :)
preload
great! will look up to it, else, not only to the fonts maybe it will be good if it adds to all the links. The warning I get seems to be happening on other scripts too.
Hey @hogyster this seems like it's expected behaviour for gatsby-plugin-prefetch-google-fonts
. The plugin is making each font be preloaded, but the fonts aren't necessarily used on each page. Check out #14608 for another approach to this. Closing this as I think it it's a warning that can be fixed. Thanks!
Hmm I've just across this issue after deploying my site.
The only difference is I'm using gatsby-plugin-google-fonts instead.
Anyone know how to remove this warning ?
@AlexMachin1997 gatsby-plugin-google-fonts
simply adds a preload for all fonts to all routes in your app, which will cause the (harmless) warnings you're seeing. This is the simplest approach with the least friction, but those warnings are unavoidable if you're not using every font on every route.
If you'd like to remove those warnings, you'll need to switch to gatsby-plugin-preload-fonts
, which preloads fonts per route, thus only preloading exactly the fonts that are required by each page. However, this plugin does require that you manually update the route-font mapping periodically, so it's up to you whether it's worth the extra effort.
If you need any further help choosing or getting setup, check out the community page for support links!
This warning is happening on my site built w/ Gatsbty because the <link rel="preload" />
tag is missing crossorigin="anonymous"
. I get 8 warnings a few seconds after the page loads. Looking at the source shows the warnings are related to <link>
element missing crossorigin="anonymous"
.
Same situation. 14 warnings. Is there a way to fix it and generally should it be fixed?
I'm experiencing similar warnings. I'm on Gatsby 4.6.2 and loading my fonts from @fontsource
Update, FWIW: I added gatsby-plugin-preload-fonts
and created the font cache as per its guide; and I don't see any further warnings. I'm glad it resolved itself but I don't see this necessarily as a good solution for medium to large-scale sites unless it can be automated as part of the build process.
I got those warning on prod site. Not sure where/how to fix...and mine aren't related to fonts.
"gatsby": "^4.14.0",
"gatsby-plugin-breadcrumb": "^12.3.1",
"gatsby-plugin-image": "^2.14.0",
"gatsby-plugin-manifest": "^4.14.0",
"gatsby-plugin-netlify": "^4.3.1",
"gatsby-plugin-offline": "^5.14.0",
"gatsby-plugin-react-helmet": "^5.14.0",
"gatsby-plugin-sass": "^5.14.0",
"gatsby-plugin-sitemap": "^5.14.0",
"gatsby-source-sanity": "^7.4.2",
gatsby-plugin-preload-fonts
this was considered or used above, is this the recommended fix? Seems like a band-aid approach and introduces another dependency to worry aboutI have the same issues as @kimbaudi mentioned above did you find a solution to make those warnings go away ?
Any updates on this ?
This issue is not closed as it has not been resolved, the solutions for the fonts are okay, but this solution does not address the remaining issues.
I have been receiving the same warnings when working through the Gatsby tutorial.
i'm receiving same warnning on safari, and working fine on chrome
Same over here too, any solution or fix for it soon?!
There is a chance this isn't really a constraining bug https://wordpress.org/support/topic/the-resource-url-was-preloaded-using-link-preload-but-not-used-within/
There is a chance this isn't really a constraining bug https://wordpress.org/support/topic/the-resource-url-was-preloaded-using-link-preload-but-not-used-within/
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?
This is definitely still an issue.
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! 💪 💜
work it.
Any word on if this was fixed I upgraded to gatsby v5 and am still having this issue?
Going nuts.
I am seeing the same issue .But I am not seeing any network call. Could you please help us out it will busy the server with so much resource calls. Or its just waring no impact on performance
Same issue here
same issue but using next js
Same issue for GatsbyJS
I am keep getting the warning message at chrome
https://www.selectchu.com
"The resource 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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
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 appropriateas
value and it is preloaded intentionally.what can be the main problem? and how to solve it?
these are plugins i use