Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6072057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:07:04+00:00 2026-05-23T10:07:04+00:00

I am using the new webTiming API exposed through Chrome and IE 9 specified

  • 0

I am using the new webTiming API exposed through Chrome and IE 9 specified in the new W3C spec.

For some reason I am getting the loadEventEnd as 0. This is restricting me from calculating the real load time.

Here’s the output and code

connectStart is: 1308411426685
responseStart is: 1308411429541
domLoading is: 1308411429548
connectEnd is: 1308411426685
domInteractive is: 1308411430023
fetchStart is: 1308411426667
secureConnectionStart is: 0
domainLookupStart is: 1308411426667
responseEnd is: 1308411429543
requestStart is: 1308411426685
loadEventEnd is: 0
domComplete is: 0
redirectStart is: 0
unloadEventEnd is: 1308411429545
domContentLoadedEventStart is: 1308411430023
domContentLoadedEventEnd is: 0
domainLookupEnd is: 1308411426667
navigationStart is: 1308411426667
unloadEventStart is: 1308411429545
loadEventStart is: 0
redirectEnd is: 0

Code:

var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var timing = performance.timing || {};
function getTiming(timingStr) {
    if (!timing) return 0;
    var time = timing[timingStr];
    return time;
}
var loadTime = (new Date().getTime() - getTiming("navigationStart"))/1000;
$(document).ready(function(){
    var perflist = '<ul id=perflist>';
    for(var performer in timing){
        var j = getTiming(performer);
        perflist += '<li>' + performer  + ' is: ' + j + '</li>';
    }
    perflist += '</ul>';
    $("body").prepend(perflist);
    $("#adminmenu").prepend("<li>Load time : " + loadTime + " seconds</li>");

Can someone help me figure out what’s wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:07:05+00:00Added an answer on May 23, 2026 at 10:07 am

    If you look at the source code in http://webtimingdemo.appspot.com/ it runs the code AFTER onload (setTimeout(‘writeTimings()’, 0)), your code runs in $(document).ready() which runs before onload as it runs on DOMContentLoaded in Chrome.

    I have put a setTimeout into your code and now it works: See http://jsbin.com/acabo4/8

    var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
    var timing = performance.timing || {};
    function getTiming(timingStr) {
    
        if (!timing) return 0;
        var time = timing[timingStr];
        return time;
    }
    var loadTime = (new Date().getTime() - getTiming("navigationStart"))/1000;
    $(document).ready(function() {
    
      setTimeout(function(){
        var perflist = '<ul id=perflist>';
        for(var performer in timing){
            var j = getTiming(performer);
            perflist += '<li>' + performer  + ' is: ' + j + '</li>';
        }
        perflist += '</ul>';
        $("body").prepend(perflist);
        $("#adminmenu").prepend("<li>Load time : " + loadTime + " seconds</li>")
      }, 100);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
I have installed API for using new feature of C# 5 but some strange
I have a question about using new[] . Imagine this: Object.SomeProperty = new[] {string1,
ADO.NET has the notorious DataRow class which you cannot instantiate using new. This is
Currently I’m having some difficulties with using new Magento's soap v2 from c# interface.
I have this test in my test base: public void WorksWithAreaUsers() { using (new
Possible Duplicate: What is difference between instantiating an object using new vs. without This
I have this code: FileDownloadHandler handler = new FileDownloadHandler(fileName); Browser.AddDialogHandler(handler); //using (new UseDialogOnce(Browser.DialogWatcher, handler))
Without iterating through each element, how do I create an array using new and
I create a map using new MapMaker().softValues().maximumSize(cacheSize).makeMap(); This seemed to work fine, however, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.