Examples | Help
stevesouders.com
 Cuzillion'cuz there are a zillion pages to check
Inline Scripts Block Rendering
posted by Steve Souders, March 17, 2008 2:08 PM
Nothing in a web page renders until all inline scripts are done executing. This is true in Firefox (1.5, 2.0) and Internet Explorer (6, 7, 8). This page contains an inline script at the bottom that takes 5 seconds to execute. Even though this paragraph and the header above are downloaded and parsed by the browser before the inline script, the browser doesn't render them until after the inlne script is done executing. To verify this, highlight some text in this page and click on the Reload button. You'll notice that it takes five seconds before the highlighted text is re-rendered. To avoid this problem make sure your inline scripts execute quickly or move your JavaScript to external scripts. If you must have an inline script that takes a long time to execute, another workaround is to kickoff the execution by calling the main function via setTimeout.


 
<HTML> <HEAD>
    </HEAD> <BODY>
      </BODY> </HTML>