Document Complete and Fully Loaded

Hi @ll!

I have a question:
We have a site with flash objects. One week ago, I saw, that the Document Complete time was in 14,538 sec. Fully Loaded was in 33,361 sec. In the waterfall diagramm I saw that the requests from the flash objects where made after the document completes. Now we removed one flash element.
Now the Document complete time and the fully loaded time are nearly the same. In the diagramm I can see, that the requests made from the remaining flash objet were made before the document completes.
So how can that be?

For me, the correct understanding of the document complete time is, when the html-Document and all embedded requests were done? Is that correct?
So why does the loading sequence changes?

Thanks for any help!


The Document complete time is measured to when the browser fires the onLoad event (technically it is when the browser object sends the DISPID_DOCUMENTCOMPLETE notification but it’s right before the onLoad and in the c++ code).

Did anything else change? It does seem odd that the behavior of the flash code would change just by removing one of the elements unless it was somehow responsible for the asynchronous behavior. I’d probably look at what triggers the flash object to start loading it’s elements and see if something around that may have changed as part of removing the other element.


You mentioned that DocumentComplete is fired when browser fires the onLoad event. Does it mean when the document starts to load, or the document completed loading?

My problem here is that I’m opening a pdf document in IE, and is using DocumentComplete to detect if the pdf has completed loading. However, it seems that the event is fired BEFORE the document has completed loading.

onLoad is after the document has completely loaded -

It is possible for javascript on the page to change the page after it loads though which is usually the cause of activity after document complete (not unusual for some chunk of javascript to execute in reaction to the onLoad event).

Also, for flash the swf itself will usually need to be loaded before onLoad but whatever the flash decides to do could occur after DocumentComplete because the flash control is pretty much independent of fthe web page itself.


I understand that the ‘Document Complete’ time is measured when the onLoad event is fired, but how the page-test recognizes that a page is ‘Fully Loaded’?

As you pointed out, there can be additional activity and the usual approach today is to wire JS execution to the onLoad event. There can also be cases where the page is actually never finishing loading, (e.g. various chat pages using Comet or pages with video streaming, ok these finish, but after a long time)

What is the actual logic, the page-test uses to decide that the page is fully loaded and the test can finish?


Sorry, the specifics for fully loaded are that the onLoad has already fired (with no new navigation) and that there is 2 seconds with no activity on the wire with no pending requests (i.e. if a request is made that takes 30 seconds for the server to respond the 2 second clock won’t start until that request has been closed).

You can force the test to stop at onLoad (particularly helpful for AJAX apps that do polling to get push updates) by clicking the “Stop Measurement at Document Complete” check box on the advanced page. If you need to get even fancier you can force it to stop at document complete but also set a “DOM Element” which will keep the test going past onLoad as needed until the condition is met.

Thanks for quick reply!

(i.e. if a request is made that takes 30 seconds for the server to
respond the 2 second clock won’t start until that request has been closed).
So, this means that if I am testing a page with e.g. video streaming (i.e. long ‘content download’ phase for at least one request), it waits just for the responses, but not till the request body is actually downloaded, correct?


Sorry, it waits for the request to be complete (fully downloaded, not just started) so if it is a progressivee video it won’t stop until the full video has downloaded. If you have a test page and let me know where you would like the measurement to stop I can give you the right configuration to measure what you want to. We test some video properties and set it to end when the video starts streaming to get the time to when the video stream starts (including the page load).



very good, it’s very useful to me, thank you very much!

runescape gold,

very good, it’s very useful to me, thank you very much!

runescape gold,