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 35175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:11:40+00:00 2026-05-10T14:11:40+00:00

How do i measure how long a client has to wait for a request.

  • 0

How do i measure how long a client has to wait for a request.

On the server side it is easy, through a filter for example. But if we want to take into accout the total time including latency and data transfer, it gets diffcult.

is it possible to access the underlying socket to see when the request is finished? or is it neccessary to do some javascript tricks? maybe through clock synchronisation between browser and server? are there any premade javascripts for this task?

  • 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. 2026-05-10T14:11:41+00:00Added an answer on May 10, 2026 at 2:11 pm

    There’s no way you can know how long the client had to wait purely from the server side. You’ll need some JavaScript.

    You don’t want to synchronize the client and server clocks, that’s overkill. Just measure the time between when the client makes the request, and when it finishes displaying its response.

    If the client is AJAX, this can be pretty easy: call new Date().getTime() to get the time in milliseconds when the request is made, and compare it to the time after the result is parsed. Then send this timing info to the server in the background.

    For a non-AJAX application, when the user clicks on a request, use JavaScript to send the current timestamp (from the client’s point of view) to the server along with the query, and pass that same timestamp back through to the client when the resulting page is reloaded. In that page’s onLoad handler, measure the total elapsed time, and then send it back to the server – either using an XmlHttpRequest or tacking on an extra argument to the next request made to the server.

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

Sidebar

Related Questions

I am forking a number of processes and I want to measure how long
How can you measure the amount of time a function will take to execute?
When I measure request times on the inside of an Asp.Net application and compare
How do you measure the memory usage of an application or process in Linux?
Is it a measure of anything that a developer or even manager can look
How can I measure number of lines of code in my PHP web development
For an ecommerce website how do you measure if a change to your site
I've been asked to measure the performance of a fortran program that solves differential
I just wonder what options there are to properly measure/profile/optimize ASP.net 2.0 Web Parts,

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.