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

M

Madhumita

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.
 
B

BerlinBrown

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top