I updated the code below after …

I updated the code below after talking to Ivan at WebKreator. It now works without opening a new window!

<body bgcolor="#FFFFFF" fgcolor="#000000" onload="javascript:endTime()">
<img src="" width=1 height=1 name="counter">

<script language="javascript">
var now = new Date();
var start = now.getTime();

function endTime()
    var now = new Date();
    var end = now.getTime();
    timeToComplete = ( end - start ) / 1000;
    alert( "this page took "+timeToComplete+" seconds to load!" );
// -->

You might also like

If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos to explore too!

Published by


Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

Leave a Reply