Detecting Broken Images in JavaScript

We’ve become accustomed to link rot and broken images in nearly all corners of the web, but is there a way to keep things a bit cleaner?
K.T. Lam of Hong Kong University of Science and Technology came up with this sweet trick using jQuery and readyState to find and replace broken images:

jQuery(’span#gbs_’+info.bib_key).parents(’ul’).find(’img.bookjacket[@readyState*="uninitialized"]‘).replaceWith(’<img src="’+info.thumbnail_url+’" alt="’+strTitle+’" height="140" [...]

Linkrot? We Don’t Have Any Steenking Linkrot!

Allen asked, via the web4lib list:
I’m interested in how others handle linkrot in library blogs. Do you fix broken links? Remove them if they can’t be fixed? Do nothing?
Michael answered:
I deal with link rot on blogs as I would with any other publication, print or otherwise: do nothing. The post is dated and users [...]