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
[gatsby-plugin-offline] creates link prefetch from link preconnect #15883
Comments
If this is really an issue and not the expected behaviour I'd be happy to discuss a possible solution and submit a PR with the fix |
does this change when reformatting the ordering of the plugins in gatsby-config? |
Yes, if I put gatsby-plugin-google-analytics after gatsby-plugin-offline it doesn't happen anymore, but I still think gatsby-plugin-offline should ignore link preload · prefetch · preconnect · dns-prefetch as a final and clean solution. Thanks anyway, it works amazingly as an hotfix :) |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contributefor more information about opening PRs, triaging issues, and contributing! Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing! Thanks again for being part of the Gatsby community! |
Description
I have both gatsby-plugin gatsby-plugin-google-analytics and gatsby-plugin-offline installed.
When running lighthouse in production, it gives me the following warning:
Which is weird cause I'm not consuming any resource from
https://marketingplatform.google.com
🤔So i started investigating and found out that basically this is coming from 2 redirects:
If you look closely the initiator is gatsby-browser.
What is happening under the hood is that gatsby-plugin-google-analytics is adding a
<link rel="preconnect dns-prefetch" href="https://www.google-analytics.com">
(gatsby/packages/gatsby-plugin-google-analytics/src/gatsby-ssr.js
Line 27 in 4ba06ab
and gatsby-plugin-offline is then consuming this link an creating a link prefetch from its href 😱
Steps to reproduce
Having both the plugins above mentioned should work. You can check this starter as a reference: https://github.com/LekoArts/gatsby-starter-portfolio-cara and run lighthouse on the production demo: https://cara.lekoarts.de
Expected result
gatsby-plugin-offline should ignore link
preload
·prefetch
·preconnect
·dns-prefetch
Actual result
it just take all the links and creates a link
prefetch
from them.Environment
The text was updated successfully, but these errors were encountered: