Not planned More jQuery CDN choices.

ShikiSuen

Well-known member
Per recent tests on our side, we have found that Microsoft jQuery CDN works in China but not the fastest...
...especially in case that the server is hosted in Mainland China within the MCG-Circle.

// Why this has to be a suggestion? 'cause this will remove end users' necessities of hacking those XF PHP files.

Here comes to my two suggestions together:

1. Introducing two more preset choices of jQuery CDN.

One is Seven-Cow CDN (Qiniu CDN) hosted inside the MCG-Circle: http://www.staticfile.org/
https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js

For those who have commuphobia and / or sinophobia, here's another one called "jsDelivery" (not a Chinese company but has blazing-fast mirrors inside the MCG-Circle): https://www.jsdelivr.com/
https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js

Considering the non-predictable future of the internet environment, an ideal choice is to allow users to add their own jQuery CDNs.

2. Introducing CDN Fallback System.

A useful case is to "set Google CDN or Microsoft CDN as default, but use the fallback CDN once the primary CDN fails to load."
Sample code (may have errors... I know less about JavaScript):
Code:
<script type="text/javascript" src="FIRST_JQUERY_CDN_ADDRESS"></script>
<script type="text/javascript"> !window.jQuery && document.write('<script src="SECOND_JQUERY_CDN_ADDRESS"><\/script>'); </script>

... or, let XenForo automatically use different CDN to visitor addresses coming from specified countries / regions, if enabled by site admin.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I can pretty much guarantee that this won't change. It's much more likely that the CDN options for this will be removed.

Due to various browser changes, a separate CDN specifically for this is more likely to be a performance negative (though it's not guaranteed).

If you have issues with the available CDNs, you should serve this locally instead.
 
Top Bottom