Slow Iframes

I am finding that three iframes on my page are consistently (well, fairly consistently) slow to load. Here is a part of the waterfall:

The iframes are called like this:
[php]
[/php]
Could it be something to do with the onLoad?

I would like to load the iframes asynchronously after the main page onLoad has fired, but I can’t find any guidance on the web that would allow me to keep the onLoad function inside it.

The speed of those iframes will be dependent on how quickly the server is generating the code to populate them.

As they are for hidden panels you could lazy load them after the main sections of the page have loaded

I use lazy loading in some other pages (jquery and jail) and it works well for images. I’ve searched for jquery plugins to do the same thing with iframes and I can’t find any. I am completely inexpert in all things javascript so I find it difficult (impossible!) to adapt code from other sources.

Well it finally turned out there was no problem with my website or the server. It is the London test machine that has caused the problem. Normally I have always used London IE8 DSL for all my testing because it was the closest to my webserver and therefore should provide the most consistent results. However having investigated this problem further I found that in 20 runs the London test machine threw up painfully slow results for those three file on 6 occasions. For comparison I ran the same tests on Dublin, Madrid and Denver and got 100% good results.

In future I will probably run my tests with Madrid because that seemed to provide the most consistent results. I’ll also have a more open mind when I encounter “problems”.