In particular I am talking about using a CDN version of JQuery which is shipped with SilverStripe 3 and 2.4 in combination with Prototype. It is used by many of the form fields amoungst other things. So why not replace the locally required JQuery, with something, out there in the wild, that will perform just a little faster.
So here is how it is done, it is very simple. Find yourself the base page controller and find the init method. What we are going to do is block the locally required JQuery and then require the CDN version. Here is one I prepared earlier:
That is it folks, nothing to it really ... but a few more rambling notes:
- Firstly, for SilverStripe 3, you will need JQuery 1.7.2. I haven't tried a later version, I just mirrored the one included with the framework. You might want to double check with other versions of SilverStripe what version of JQuery was packaged with it.
- Lastly I have used cdnjs, I like this one as they have ... a plethora of pinatas, El Guapo ... I mean a lot of different CSS ans JS libraries but there are alternatives: Google, Microsoft and JQuery.
Hope this saves you a few milliseconds, some bandwidth and maybe even a watt of power. All adds up.