CartoDB / carto.js

CartoDB javascript library
BSD 3-Clause "New" or "Revised" License
423 stars 264 forks source link

Can jQuery be pulled out of the library such that other CDNs can be used to serve it? #30

Closed dshorthouse closed 11 years ago

javisantana commented 11 years ago

no for the moment, in any case jquery included with cartodb.js do not replace any jquery loaded before

why would you like to load jquery from other cdn? we dicussed this in the past and we'd like to hear feedback about this.

Thanks in advance

dshorthouse commented 11 years ago

jQuery is a moving target but is often cached at the ISP. Bundling it in with cartodb.js makes for an unnecessarily large, synchronous, blocking download (see http://www.webpagetest.org/result/130228_6F_K66/1/details/). Fine for fast broadband connections, but horribly inefficient for mobile or for those with poor Internet connectivity.

javisantana commented 11 years ago

using a cdn cached jquery would improve because it is usually cached in the client but we decided to include to do it easier for people to start with cartodb

we could create a version without jquery in the next release.

thanks for your feedback

javisantana commented 11 years ago

http://libs.cartocdn.com/cartodb.js/v2/2.0.22-dev/cartodb.nojquery.js

it is a dev version, in the next release it will be included as

fixed in https://github.com/CartoDB/cartodb.js/commit/08b1b1440cf05dbadf7e5b5ebbebd0373ff1ef35

impronunciable commented 11 years ago

IMHO the real challenge is yo drop the jQuery dependency;)

javisantana commented 11 years ago

yeah, but not for now