-
Notifications
You must be signed in to change notification settings - Fork 335
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
Fetch all resources from a single CDN #893
Conversation
The update to BS4 will be problematic - the layout changed substantially and required a lot of fidding to get it right. Probably better as a separate PR. |
Yeah, you're right. I moved all changes related to bootstrap to a new branch (PR #894). This should be ready for review if you wish. |
Actually, there could be a base for keeping multiple CDN. If one resource is overwhelmingly fetched for one place (say for example that 90% of websites fetch bootstrap from But even in that case, the URLs should be updated to the canonical CDN for each library. From what I have seen in my tests, this PR should still result in a speed up because the majority of the time for page load is spent in the DNS resolution and TLS negociation. That's just |
I think using the same CDN makes sense to me. @dongzhuoer, @BruceZhaoR, @yiluheihei: I know CDN choice can make a difference for Chinese users. Do you have any concerns about switching all links to use cloudflare? |
I haven't noticed the CDN. Maybe I need to use it for a while to see the performance. |
Another possible criterion to choose the CDN: some users may use the browser extension decentraleyes, which locally mirrors popular CDN. It would probably be good to use on from its list of mirrored CDN. |
@hadley cloudflare works fine in China. I'm going to use |
@BruceZhaoR, good catch, thank you! It should be fixed now. I also added a test page for mathjax to ensure that future changes don't break its functionality. |
This all looks good. Adding a mathjax test vignette is a good idea. |
Can you please add a bullet to NEWS? It should briefly describe the change and end with |
It should be more efficient to load all resources from a single CDN because DNS resolution, TLS handshake, etc. only need to be performed once.
I picked cloudflare because it looks like it was already providing the largest number of external resources.
Also, as cool side effects:
I tested the changes locally and everything seems to work fine
TODO:
Update bootstrap