Skip to content

Conversation

@jonchurch
Copy link
Member

@jonchurch jonchurch commented Dec 5, 2025

Vendor assets are served from /vendor/... (same origin), so crossorigin attribute on preload hints causes a credentials mode mismatch. The browser preloads with anonymous credentials but requests without, resulting in cache misses and double fetching.

opened as draft so I can compare the deploy preview to the prod site console warnings, check my math basically

On the prod site I see a warning on the homepage:

A preload for 'https://lodash.com/vendor/cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

And on the /docs route after hard refresh we see:

A preload for 'https://lodash.com/vendor/cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

This PR eliminates those warnings.

Vendor assets are served from /vendor/... (same origin), so crossorigin
attribute on preload hints causes a credentials mode mismatch. The browser
preloads with anonymous credentials but requests without, resulting in
cache misses and double fetching.
@netlify
Copy link

netlify bot commented Dec 5, 2025

Deploy Preview for lodash ready!

Name Link
🔨 Latest commit 56756a3
🔍 Latest deploy log https://app.netlify.com/projects/lodash/deploys/69335bacf3e91a00083fb843
😎 Deploy Preview https://deploy-preview-304--lodash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

hints:
all: [
'</sw.js>; rel=serviceworker',
'<https://cdn.jsdelivr.net/>; rel=preconnect; pr=1.0; crossorigin',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we just dont use anything from jsdeliver directly anymore, we serve under our own origin

@jonchurch jonchurch marked this pull request as ready for review December 5, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants