The day jQuery broke

If you’re using jQuery on your site (or your client’s), you probably have this line at the very bottom of your pages:

It’s a good way for avoiding an extra HTTP request if the visitor has the script already loaded in his browser cache. However, it’s relying on a remote source, which means that you have no control over it. So if the file is removed or the link breaks for any reason, your site (or your client’s) won’t be able to load it.

That happened on October the 24th, 2012. I was working on a client’s new site on my localhost and things were showing a litte weird. I knew immediately it was a javascript issue, because at this point I still hadn’t written the necessary CSS to make it look “normal” with no javascript enabled, and I always work with javascript disabled in the browser. But for a reason it wasn’t disabled that day, so I thought maybe my remote link was wrong, I navigated to the source link above, to find this:

Yeah! jQuery’s site was broken, and it was for at leat 10 minutes. So a lot of websites around the globe could be looking weird at a time. A funny idea, but not so funny if your site is jQuery dependent.

To me it reinforced the idea on progressive enchancement and unobstrusive javascript. Because not only your visitors can have it disabled on their browsers; there is always a chance that your remote source is missing.

October 26, 2012

One thought on “The day jQuery broke

Comments are closed.