Integrated webpage test?

Is there such a thing as an integrated webpage load test script? e.g. a small script that would be an integral part of the webpage being measured.

A PHP-based timer would be initiated when the webpage was first being executed on the server. Then a Javascript would take over once delivered to the client and would stop when the webpage was “done” as indicated by the browser. I know there are gaps in the plan, e.g. the time between when the PHP completes on the server and when the Javascript begins on the client. Perhaps no way around that(?)

If there is no way around that, could you measure the time it takes to load the page beginning when the page just starts in the client and when “done” is displayed?

The results would be displayed directly within the browser page of the viewing client by using a Javascript “getelementbyID” link.

Perhaps that is something that is already available.

I am very impressed by the results your WebPagetest delivers. I had always wondered whether all those little graphics contributed to latency… Turns out they’re not “free”. Load enough of them and seconds are added.

Thanks for this service. It’s great!


Not 100% sure I understand what you’re looking for but there is a free open-source solution called jiffy-web that you can use to instrument your pages with javascript and collect metrics from the field. It’s geared more at being transparent and having the page send the data back up in a beacon call so that you can run reports on what all of your users are seeing.

Here is the main page for it:

If you really wanted to view the output in the browser I’m sure you could also modify the code.

If you just want to be able to do similar performance testing from within your browser, there is the “desktop version” of pagetest which is a browser plugin for IE that can give you the same measurements (and is actually what is used for the website). You can get that here:

Thank you for response…

I wanted to be able to display a text message on my webpage that would appear when the page was loaded that would say something like, “Required 5 seconds to load page.” If the variable “5” (time in seconds) was available, I could log it if desired. But didn’t really need anything else but that. I figure a javascript could do the timing. But not sure.

It would seem that if the Javascript was waiting for the page to complete, the page would never complete because it would be waiting for the Javascript to terminate.


For the javascript you just need to set an “onLoad” handler and that will fire when the page is complete. Getting the “start” time is the hard part but the jiffy-web code probably has some things you can swipe to help with that. Then the onLoad handler just needs to calculate the delta and write it out to a spot on the page.

What is “onLoad” !!

I am java program developer bot I couldn’t heard this thing !!!

Is it very useful for me !!!