For what does the Xenforo software need code.jquery.com?

It looks like a lot of the javascript functionality has been implemented using jQuery, which makes the code a hell of a lot shorter and easier to write, especially for more complex features and things that vary between browsers (although that's less of an issue these days)

They could of hosted it directly on forums.freebsd.org, but it's very common to see sites use CDNs for libraries like this. It used to be that browsers would only open so many connections to a single server, so sourcing content off a CDN would improve load speed. Various online profiling tools used to give recommendations about this. Not sure if it's that relevant anymore though. It also means that all websites using the same CDN will use the same cached copy of the file in your browser, rather than every website causing you to download and cache their own, probably identical, copy of the library.

To rephrase it slightly, why is the forum using jQuery, or loading it from their CDN a problem? I appreciate that it could all be written in plain javascript, but that would be a lot more work, and be reimplementing a lot of code, especially when you take into account the years of real world testing jQuery has had across millions of websites and thousands of browser and operating system releases.
 
As a web developer I'm really intrigued about the reasons for blocking jquery. Is it the utility in particular or just the possible tracking from a 3rd party source?

I've just tested blocking code.jquery.com and it appears that the forum loads a copy from its own host if that doesn't work. Blocking jquery completely breaks pretty much all dynamic functions (alerts/messages dropdowns, user info panel, etc). Also seems this rich text editor disappears as well. Seems most of the js functionality has been written through jquery.
 
Back
Top