Skip to content

Instantly share code, notes, and snippets.

@cowboy
Created June 30, 2010 15:06
Show Gist options
  • Save cowboy/458768 to your computer and use it in GitHub Desktop.
Save cowboy/458768 to your computer and use it in GitHub Desktop.
Something simple for testing slow loading pages
// Block page loading, for testing ready events / etc.
function block( delay ) {
var html = '<script src="http://1.cuzillion.com/bin/resource.cgi?type=js&sleep='
+ delay + '&jsdelay=' + delay + '&t=' + +new Date + '"><\/script>';
document.write( html );
};
/*
Sample usage. Block page loading for 1 second:
<script type="text/javascript">block(1);</script>
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment