I just figured out how to add custom functions/plug-ins to jQuery from my previous question How to extend jQuery from CDN?. Now, my question is, how if some functions in jQuery isn’t necessary for the page? I’ve decided to remove those functions and just add them later on if I need them. But, if I’ll remove ’em, I cannot use Google’s CDN for my jQuery, I’m certain now that it is possible to extend the jQuery from CDN, but I don’t hink I can delete some functions there.
Questions:
-
Which is better(in any aspect), a jQuery from CDN with lot of uneccessary functions or a jQuery on my own FTP with reduced size(by removing uneccessary functions)?
-
If a modified/reduced jQuery on my own FTP is better, how to remove those functions properly? What are the conflicts? Or are there functions dependent to another functions?
-
If a jQuery from a CDN is better, in your opinion, which server has the best to offer?
Whether you reduce the size of the jQuery or not in your own FTP, Normally you dont want to modify the jQuery library by manually removing the unnecessary functions unless you have a knowledge over the dependency structure of the library (which I think we all dont). Therefore, I would just stick to jQuery from CDN in your case if I were you.
As I said, it is very hard and almost impossible to modify a huge code library such as jQuery, even using minifier tools such as YUI compressor or google closure compiler..So, Again; You do not want to do that at any cost.
As far as I know, google is quite reliable. However, here are some suggestions for you:
–Microsoft CDN vs Google CDN
–Why Google CDN