DHTML  |  DHTML + setTimeout

Loading a page via DHTML isn't enough to avoid the issue where IE blocks the page from rendering. This test page contains the following code:

function loadStylesheet() {
	var link = document.createElement('link');
	link.rel = 'stylesheet';
	link.type = 'text/css';
	link.href = '/bin/resource.cgi?type=css&sleep=4&t=1280588488';
	document.getElementsByTagName('head')[0].appendChild(link);
}

loadStylesheet();

The stylesheet is configured to take four seconds to download. If you load this page in Internet Explorer the page will be blank for four seconds. To avoid IE's blocking behavior you can call the DHTML code via setTimeout as demonstrated on the DHTML + setTimeout page.

For more information see my blog post: 5d dynamic stylesheets.