Sunday, April 1st, 2007
Ask any self-respecting Ajax developer how they time events, and they’ll tell you “I use setTimout()” or more likely, “I use setTimeout(), duh”. However, two new Ajax patterns are making that “duh” seem just a little tenuous. One new timing technique relies on the notorious <blink> tag, the other is all about the whitespace. That’s right folks, setTimeout() is about to go the way of the fob watch.
- <blink> timing For a long time, the ignoble <blink> tag seemed destined for all the one-hit wonderness of a Vanilla Ice or an MC Hammership. Loved for a month or two, then cast aside with nought but the occasional fond memory. Yet in an unanticipated turn of events, intrepid developers have recently been asking hard questions about <blink>. “If it was really as dumb as people make out, why was its timing so precise?” asked one Ajax guru who wished to remain anonymous on the grounds that he had been consuming Red Bull for the past eight hours. Another guru in questionable state pointed out “setTimeout() isn’t all that! Did you ever try it in lynx? Total no-op!” And so it was that <blink>’s true purpose became known. Reborn as much out of frustration with setTimeout as it was with the promise of a more robust solution. No longer eye candy, but a super-precise timing mechanism. The thinking geek of 2007 embeds a single <blink> tag on the page, hides it with CSS, and arranges all application scheduling against the swift oscillations of this postmodern crystal timer.
We’ve yet to see these facilities live, but then we haven’t yet seen Vanilla Ice live either and he’s doing just fine. setTimeout() is dead, long live the <blink> tag!
Posted by Michael Mahemoff at 6:49 am