WebPagetest Forums

Full Version: Slow Iframes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am finding that three iframes on my page are consistently (well, fairly consistently) slow to load. Here is a part of the waterfall:
[Image: Capture.JPG]

The iframes are called like this:
PHP Code:
<iframe src="../prices.php?hid=<?php echo $row_hotel['hid'];?>" width="100%" height="200px" id="iframe1" marginheight="0" frameborder="0" onLoad="autoResize('iframe1');"></iframe
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
(04-23-2013 06:35 AM)andydavies Wrote: [ -> ]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".
Reference URL's