Current time: 07-23-2019, 05:16 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Slow Iframes
04-22-2013, 09:59 PM (This post was last modified: 04-22-2013 10:01 PM by Little Hotels.)
Post: #1
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:
[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.
Find all posts by this user
Quote this message in a reply
04-23-2013, 06:35 AM
Post: #2
RE: Slow Iframes
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

Andy

Using WebPageTest - http://usingwpt.com/
Visit this user's website Find all posts by this user
Quote this message in a reply
04-23-2013, 08:13 PM
Post: #3
RE: Slow Iframes
(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.
Find all posts by this user
Quote this message in a reply
04-26-2013, 01:05 AM
Post: #4
RE: Slow Iframes
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".
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)