[thelist] (how to stop) IE6 rendering before it has fully compiled

Lee kowalkowski lee.kowalkowski at googlemail.com
Mon Nov 20 05:17:21 CST 2006


On 20/11/06, Barney Carroll <barney at textmatters.com> wrote:
> Does anyone know of any simple way to make IE wait til it has fully
> digested the content before prematurely displaying it?

You could put this in your head element...

    <script type="text/javascript">
      if(window.attachEvent)
      {
        document.write("<div id='hide' style='display:none'>");
        window.attachEvent("onload",
          function()
          {
            var hideDiv = document.getElementById("hide");
            hideDiv.removeNode ? hideDiv.removeNode() :
hideDiv.style.display = "";
          }
        );
      }
    </script>

It has the added bonus of filtering out impatient users too.  Think
how much you'll save on traffic!

-- 
Lee



More information about the thelist mailing list