Discussion in 'XenForo Questions and Support' started by jellytoe, Nov 3, 2015.
Title says it all. Is there a downside to hosting Jquery with Google?
Visitors may already have Google-hosted jQuery cached from another site
Google's CDN means the user may be able to download it faster
Potential additional DNS lookup if the file is not cached
However, it seems unlikely that a visitor would have the exact same version of jQuery cached because the version of jQuery used by XenForo is nearly two years old (1.11.0), and the amount of CDN speed-up to download what amounts to 33kb of text is probably negligible.
It probably won't help or hurt much, but you can try testing both with https://gtmetrix.com to be sure.
Using the CDN is recommended. And yes, XenForo provides a fallback as described on that page.
I tripped across the same article a few days ago and was wondering where I should share the information about it on here? Image my surprise when I saw the link above already on here! ha, ha @Jake Bunce That is quite a talent to post an answer, before I can even come up with an inquiry about such.
In part, the article reads...
"I urge you to use the Google Hosted Libraries content delivery network to serve jQuery to your users directly from Google’s network of datacenters. Doing so has several advantages over hosting jQuery on your server(s): decreased latency, increased parallelism, and better caching.
In this post, I will expand upon those three benefits of Google’s CDN and show you a couple examples of how you can make use of the service…"(continued)
I've tested and find that using the default self-hosted jQuery is, on average, fastest for my sites.
Ymmv - worth it to do the testing!
Separate names with a comma.