You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
I use GTmetrix to measure my website's performance regularly. It makes suggestions as to optimisations.
One issue I'm currently getting highlighted by the tool is "Serve resources from a consistent URL - The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL"
I've disabled and re-enabled Netlify asset optimisation, as well as changing my jekyll-assets config to no luck. It seems that <img src> asset references are always served with the CloudFront domain, whilst <link href> references are always served off the Netlify origin domain.
Here are the extracts of the Netlify produced source code; where simpler-bulb-primary-dark.svg is the exact same resource unnecessarily duplicated by two different HTTP requests: <link rel="preload" as="image" href="/assets/simpler-bulb-primary-dark.svg"> & <img width="250" height="250" alt="Smart Helping Hands logo" src="https://d33wubrfki0l68.cloudfront.net/abdba9c31570febda716627613edee7c1b7b9338/057de/assets/simpler-bulb-primary-dark.svg" integrity="sha256-5z1P4yeVXgVsxe/bywcAGcessUwED2e8NgmMsxRhKBo=" crossorigin="anonymous">'
Is this a bug in Netlify, or is there a way of fixing this behaviour?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
About me
My question in a little more detail
I use GTmetrix to measure my website's performance regularly. It makes suggestions as to optimisations.
One issue I'm currently getting highlighted by the tool is "Serve resources from a consistent URL - The following resources have identical contents, but are served from different URLs. Serve these resources from a consistent URL"
I've disabled and re-enabled Netlify asset optimisation, as well as changing my
jekyll-assets
config to no luck. It seems that<img src>
asset references are always served with the CloudFront domain, whilst<link href>
references are always served off the Netlify origin domain.Here are the extracts of the Netlify produced source code; where
simpler-bulb-primary-dark.svg
is the exact same resource unnecessarily duplicated by two different HTTP requests:<link rel="preload" as="image" href="/assets/simpler-bulb-primary-dark.svg"> & <img width="250" height="250" alt="Smart Helping Hands logo" src="https://d33wubrfki0l68.cloudfront.net/abdba9c31570febda716627613edee7c1b7b9338/057de/assets/simpler-bulb-primary-dark.svg" integrity="sha256-5z1P4yeVXgVsxe/bywcAGcessUwED2e8NgmMsxRhKBo=" crossorigin="anonymous">'
Is this a bug in Netlify, or is there a way of fixing this behaviour?
The text was updated successfully, but these errors were encountered: