News for hackers. Stuff that matters.
Re:JQuery 2.0 Released by darkandbrooding on Thursday April 18, 2013 @10:18PM (#5574379)
I've read through the 100+ comments that preceded me, and I must be missing something stupidly obvious. Thanks in advance to anyone who can enlighten me.

Can't you just host your own copy of JQuery? If your web app needs version x.y.whatever, is there some reason why you can't just host your own copy of the library on the same servers the provide the rest of your web content?

I understand the convenience of using some CDN's copy of JQuery, but I'm unsure why it's anything other than a convenience. Maybe it's about money: "It'll cost us an extra $X per month in bandwidth fees to host our own version of JQuery." Maybe it's about user experience: "By hosting JQuery on our own site we add 100ms to page load times."

To the people who seem most unhappy about the version bump, can you describe how hosting your own version of JQuery would complicate your lives? Just so there is no ambiguity, I'm asking from a point of ignorance, not snark. I would genuinely like to read the answers.

Re:JQuery 2.0 Released by crazygringo on Thursday April 18, 2013 @10:44PM (#5574444)
There is zero problem with hosting your own copy. Lots of people do.

The main advantage to using a CDN is that a single copy can be cached across multiple websites, meaning that the first time someone visits your site, there's a good chance your version of jQuery already sits on their computer. Plus, the Google CDN will often serve content faster than your own site. And, since jQuery is now so "integral" to websites, it almost seems silly to have to maintain a copy of it yourself.

But the main downside to using a CDN is that, CDN's have gone down before, and that means your site will stop working. Obviously, it doesn't happen often, but it happened once to a widely used site of a friend of mine, and he swore, never again will he reference jQuery on a CDN. I personally prefer to host myself too. (But not out of bandwidth savings, that just winds up being trivial.)

Re:JQuery 2.0 Released by Dave9k on Thursday April 18, 2013 @11:15PM (#5574538)
You can use a CDN and fallback to local if it goes down.

http://stackoverflow.com/questions/5257923/how-to-load-local...

Re:JQuery 2.0 Released by crazygringo on Friday April 19, 2013 @11:12AM (#5577043)
I would be wary of that -- I assume it's likely that a CDN would often time out in case of error, which means you might be looking at 30 or 60 seconds until JavaScript works on your page.
Re:JQuery 2.0 Released by darkandbrooding on Friday April 19, 2013 @12:44AM (#5574876)
Y'know, I hadn't even considered that your browser might already have a cached copy of JQuery because of a previous visit to some other site. Like the friend you mentioned, the idea of third-party hosting for a critical piece of infrastructure is a non-starter for me. If my site depends on X, I prefer (the illusion of) control over X.
Re:JQuery 2.0 Released by lessnonymous on Thursday April 18, 2013 @11:54PM (#5574702)
It's not about being able to access 1.x in the long term from a CDN. The problem is whether it will still be supported. If there are bugs in 1.x, will they be fixed? Will 1.x support Chrome v40 and IE 15?
Re:JQuery 2.0 Released by _sh on Friday April 19, 2013 @12:34AM (#5574845)
Backporting bugfixes has a cost. Requiring 1.x to support IE15 pushes that cost onto the jQuery developers instead of where it rightfully belongs: migrating your app to a recent version.
Re:JQuery 2.0 Released by darkandbrooding on Friday April 19, 2013 @12:58AM (#5574942)
Thanks for the clarification. Although the JQuery team didn't announce any end date for support of 1.x, I appreciate the ticking clock implicit in the major version bump.

I suspect that a comment made by user Zangrief is right on the money - enterprise users will increasingly take over maintenance of the 1.x branch out of necessity.