Skip to content
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

Docs: Don't load jQuery from 3rd party CDN for v4 Docs #32668

Closed
coliff opened this issue Jan 4, 2021 · 4 comments
Closed

Docs: Don't load jQuery from 3rd party CDN for v4 Docs #32668

coliff opened this issue Jan 4, 2021 · 4 comments

Comments

@coliff
Copy link
Contributor

coliff commented Jan 4, 2021

Suggestion: on the v4 docs jQuery is loaded from the jQuery CDN (https://code.jquery.com/jquery-3.5.1.slim.min.js), with a local fallback. It'd be less HTML code and likely always better for performance if it always loaded jQuery locally. It'll save the cost of opening a new TCP connection (DNS resolution, TCP handshake and TLS negotiation). Browsers don't have Cross-Domain caching so there's no advantage in using a 3rd party CDN anymore (as your site is served from a CDN anyway).
Good explainer here (with Bootstrap being used as the example):
https://csswizardry.com/2019/05/self-host-your-static-assets/

@XhmikosR
Copy link
Member

XhmikosR commented Jan 5, 2021

Yeah, it's low priority for sure since we have moved to v5, but I guess we could look into it for the next 4.x version.

@XhmikosR
Copy link
Member

So, I don't think I'd like to make this change right now, and add back a 3rd-party file to track and update. If/when we manage to handle all of our 3rd-party assets through npm, we could definitely do it.

What we could do right now is switch to jsDelivr thus one less CDN.

@coliff
Copy link
Contributor Author

coliff commented Jan 25, 2021

sounds good. 👍

@XhmikosR
Copy link
Member

XhmikosR commented Oct 8, 2021

@coliff I'm going to close this for now. We have switched to using jsDelivr for all assets so this should still be better.

@XhmikosR XhmikosR closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants