var i = new Image();
i.onload = function() {
// an error occurred
if (i.width === 1) {
// error #1
}
if (i.width === 7) {
// error #7
}
// etc...
};
i.onerror = function() {
// success!
};
i.src = "mystuff.php";
Cool idea, evidently at play live within one top-100 site according to the comment thread. Via Jon Snook’s delicio.us feed.