I've got a sidebar with lots of functionality in it. It works great, but now I've got a module on it that takes a bit to load (it's using file_get_contents()
for 3 requests, though they are cached). It takes a minute, so the site looks broken for a minute.
I presume this is because it goes like this
<aside class="sidebar">
<div class="module one">Stuff</div>
<div class="module two">Stuff</div>
<div class="module three">Stuff</div>
<div class="module four">Stuff</div>
<div class="OMG I TAKE A SECOND TO LOAD">FOOBAR</div>
</aside>
I presume it gets stuck parsing the last div, thus doesn't actually close the sidebar yet.
My question is is there a "good" (preferably javascriptless) way to load all the sidebar, and close it, before the long loading div loads?