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" [...]
Posted June 16, 2008 by Casey Bisson
Categories: Technology. Tags: broken images, javascript, js, link rot, onerror, web design. One Comment.
It was part of a long thread among WordPress hackers over the summer and fall, but this post at VulgarisOverIP just reminded of it: minify promises to be an easy way to compress external CSS and JavaScript without adding extra steps to your develop/deploy process. No, really, look at the usage instructions. (To be clear, [...]
Posted December 5, 2007 by Casey Bisson
Categories: Dispatches, Technology. Tags: code, compression, css, js, minify, performance, script, web development. 2 Comments.