How to find the load time for the content in an iframe

Discussion in 'Javascript' started by Madhumita, Feb 5, 2008.

  1. Madhumita

    Madhumita Guest

    Hi,
    I am trying to compute the load time for the contents of an iframe. I
    do this by recording the start time before the iframe starts loading
    and the end time on the onload call of the iframe. xample:

    <IFRAME id="frame1" src="about:blank" WIDTH=200 HEIGHT=200
    ONLOAD="record_endTime()" >
    </IFRAME>
    <script>
    url = <some url>;
    record_startTime();
    document.getElemenetById('frame1').src=url;
    </script>

    Is there any guarantee that the record_startTime will always execute
    just before the loading of the iframe, esp in the case when I may have
    mutiple components (images and other iframes ) on the same page? My
    idea is to make record_startTime and frame.src=<> atomic. Is that
    possible in some other way?

    Thanks.
    Madhumita, Feb 5, 2008
    #1
    1. Advertising

  2. Madhumita

    BerlinBrown Guest

    On Feb 5, 3:59 pm, Madhumita <> wrote:
    > Hi,
    > I am trying to compute the load time for the contents of an iframe. I
    > do this by recording the start time before the iframe starts loading
    > and the end time on the onload call of the iframe. xample:
    >
    > <IFRAME id="frame1" src="about:blank" WIDTH=200 HEIGHT=200
    > ONLOAD="record_endTime()" >
    > </IFRAME>
    > <script>
    > url = <some url>;
    > record_startTime();
    > document.getElemenetById('frame1').src=url;
    > </script>
    >
    > Is there any guarantee that the record_startTime will always execute
    > just before the loading of the iframe, esp in the case when I may have
    > mutiple components (images and other iframes ) on the same page? My
    > idea is to make record_startTime and frame.src=<> atomic. Is that
    > possible in some other way?
    >
    > Thanks.


    Sorry, dude, in my question; I don't have an answer. I started a
    completely separate question.
    BerlinBrown, Feb 5, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daedalous
    Replies:
    3
    Views:
    659
    Daedalous
    Jan 16, 2004
  2. nc
    Replies:
    0
    Views:
    137
  3. Mel
    Replies:
    1
    Views:
    232
    Martin Honnen
    Jun 8, 2005
  4. Paul
    Replies:
    3
    Views:
    131
  5. BerlinBrown
    Replies:
    5
    Views:
    328
    BerlinBrown
    Feb 5, 2008
Loading...

Share This Page