Javascript cdns and versions on [2013-01-25 Fri 05:32]

I've recently been linking to cdn copies of popular javascript libraries such as jquery, underscore instead of downloading them directly to my project. First, it's a step or two faster. It also should make the app load faster if the person had already pulled it from the CDN. Reason #1 is the primary reason.

That's all great until the cdn updates its version and breaks my app. It happened this week with an update to jquery 1.9 which finally removed the 'live' function. It had been deprecated since 1.7 and I still had the bad habit of using it.

All of a sudden my app stopped working correctly. Some googling made me realize that others had the same problem and the root cause turned out to be that I was linking directly to jquery.min.js on the jquery cdn which had been updated.

Lesson learned. It's not worth the extra speed or less development step unless linking directly to a known version. Definitely a boneheaded move on my part.

Prev: new host  Next: finding the missing post