I ran PageSpeed Insights and it told me this
Preconnect to required origins
Consider adding `preconnect` or `dns-prefetch` resource hints to establish early connections to important third-party origins. Learn more.
URL
Potential Savings
https://fls-na.amazon-adsystem.com
https://ir-ca.amazon-adsystem.com
https://fonts.googleapis.com
https://images-na.ssl-images-amazon.com
https://ws-na.assoc-amazon.com
I'm using Gatsby so I connected them using the plugin gatsby-plugin-preconnect
{
resolve: 'gatsby-plugin-preconnect',
options: {
domains: [
"https://ir-ca.amazon-adsystem.com",
"https://fls-na.amazon-adsystem.com",
"https://images-na.ssl-images-amazon.com",
"https://fonts.googleapis.com",
"https://ws-na.assoc-amazon.com"
]
}
}
Then I run PageSpeed Insights again and it tells me
Preconnect to required origins
Warnings:
A preconnect <link> was found for "https://fonts.googleapis.com" but was not used by the browser. Check that you are using the `crossorigin` attribute properly.
A preconnect <link> was found for "https://ws-na.assoc-amazon.com" but was not used by the browser. Check that you are using the `crossorigin` attribute properly.
A preconnect <link> was found for "https://images-na.ssl-images-amazon.com" but was not used by the browser. Check that you are using the `crossorigin` attribute properly.
A preconnect <link> was found for "https://fls-na.amazon-adsystem.com" but was not used by the browser. Check that you are using the `crossorigin` attribute properly.
A preconnect <link> was found for "https://ir-ca.amazon-adsystem.com" but was not used by the browser. Check that you are using the `crossorigin` attribute properly.
I received a much worse performance score with them preconnected
It has something to do with how the gatsby-plugin-offline preloads these assets.
I havegatsby-plugin-offline
but I don't know if I'm using it or not. I read that'd it'd be good to install so I did. Could I remove it possibly? – Induna