Change jQuery library source


(goob) #1

Given the furore over tracking/snooping by some of the largest web companies, and Google in particular, what do you think about changing the source of our jQuery library from

//ajax.googleapis.com/ajax/libs/jquery/1.x.x/jquery.min.js

to

//code.jquery.com/jquery-1.x.x.min.js

I raise this because I’ve seen quite a few posts screaming about how Diaspora is allowing tracking of people because it enables googleapis.com. Now this might be a misapprehension on those people’s parts, but if there’s no performance benefit to using Google’s jQuery library over the one on jQuery’s domain, I think it would be worth changing it just to avoid people getting a bad impression of Diaspora’s privacy policies.

(This is assuming that Diaspora doesn’t use Google APIs for anything else…)


Note: This discussion was imported from Loomio. Click here to view the original discussion.


(Jason Robinson) #2

I think it is already a configuration setting whether to use a CDN or local jquery files?

But agree, we could change it to jquery,com instead of google, if pod uses the cdn setting.


(raven24) #3

I don’t see a need for a lengthy discussion for this change. just submit it as a pull request :slight_smile:


(goob) #4

Well, I wanted to get people’s views on it, for example if there was a usability issue in favour of getting the library from Google. If it makes no odds, sure I’ll make a PR. I’ll just leave it a while longer in case anyone has an objection.


(Sean Tilley) #5

I’d be fine with it being changed, considering quite a few of our users and podmins probably don’t like Google very much.


(Christophe) #6

code.jquery.com is an alias for code.jquery.netdna-cdn.com.


(Jason Robinson) #7

Merged in develop now.


(moy) #8

and cdnjs.com, as alternate not only for javascript?
https://github.com/cdnjs


(Charles-Edouard Coste) #9

I don’t even understand why any developer may want to use a third party CDN ?!
This is completely silly, according to me.
First of all, static assets should be hosted on the pod or on a CDN related to the pod not to depend on other services. And moreover, static javascript assets should be merged and optimized to save useless requests.
That’s my point of view.


(Flaburgan) #10

@charlesedouardcost it’s only a setting, you can choose to use the CDN or not.


(Charles-Edouard Coste) #11

OK @Flaburgan but actually, to avoid any problem, I would encourage disabling it. (still my own humble opinion)


(Sean Tilley) #12

@charlesedouardcost While I absolutely agree with where you’re coming from, the reality is that CDN’s are necessary for the “big” pods that have lots of users and content on them. Some services, such as Heroku, don’t allow you to upload images without making use of a CDN.

Currently, there isn’t much of a great solution to the problem, other than encouraging potential new users to sign up at other pods. In the long run, I think this could be mitigated by supporting user data migration from one pod to another.