Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetch all resources from a single CDN #893
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
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
@hadley cloudflare works fine in China.
I'm going to use