Recovered from the Wayback Machine.
brothercake at SitePoint has come with a way of eliminating the need for document.write, which is to give the script element an identifier and use it as point of reference where to place the content using the proper DOM functions.
It’s something that should have been obvious, but wasn’t until it was pointed out. As one commenter wrote, a real slapping the head moment.
(via Simon Willison)