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

  • SEARCH
  • Home
  • 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 8722701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:28:17+00:00 2026-06-13T07:28:17+00:00

I am looking for a proper way to test the time it takes a

  • 0

I am looking for a proper way to test the time it takes a page to fully load all its resources. What I’ve done so far is add:

window.startTime = (new Date).getTime(); // after the title in my page

And

window.onload = function () {
    console.log((new Date).getTime() - window.startTime);
}
window.addEventListener('load',function () {
    console.log((new Date).getTime() - window.startTime);   
},false);

Way down in the footer. Is this a good way to measure?
Could there be differences between load time and perceived load time? From what I’m seeing the events trigger after all the resources have loaded including images.
Are there any differences between the two events? Also can I use PageSpeed to test this? (I know I can do it in chrome dev tools, but I also want a script so that I can keep track of data.)

  • 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-06-13T07:28:18+00:00Added an answer on June 13, 2026 at 7:28 am

    It is pretty much the only way in legacy browsers to measure times. But for the rescue, most browsers do implement the window.performance object which offers a very, very accurate way of getting times.

    A typical window.performance.timing output:

    connectEnd 1351036536696
    connectStart 1351036536696
    domComplete 1351036538277
    domContentLoadedEventEnd 1351036538146
    domContentLoadedEventStart 1351036538119
    domInteractive 1351036538042
    domLoading 1351036537552
    domainLookupEnd 1351036536694
    domainLookupStart 1351036536694
    fetchStart 1351036536696
    loadEventEnd 1351036538295
    loadEventStart 1351036538277
    navigationStart 1351036536696

    ..which is not even the full list.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking a proper way to implment a ScaleAnimation. My purpose is to
I'm looking for a proper way of placing popup div-element in the center of
I'm looking for a way to make a small preview of another page from
I'm trying to find the proper way to add a custom widget to the
I am currently looking for a proper way to restrain the usage of a
I've been looking for a proper way to get file associations working on WinXP
I'm looking for a reference that tells you the proper way to name form
Looking for the proper way to handle orientation in my MonoTouch game (although answers
I'm looking for the proper way to reference an appender that already exists to
I'm looking for a proper way to copy java.util.Stack in Java. Stack doesn't seem

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.