@codemeit is right. His solution looks something like the following using jQuery for the ajax request. This returns the request time in milliseconds.
var start_time = new Date().getTime();
jQuery.get('your-url', data, function(data, status, xhr) {
var request_time = new Date().getTime() - start_time;
});
More Related Contents:
- How can I upload files asynchronously with jQuery?
- “Origin null is not allowed by Access-Control-Allow-Origin” error for request made by application running from a file:// URL
- Allow Google Chrome to use XMLHttpRequest to load a URL from a local file
- No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘…’ is therefore not allowed access
- Upload file with Ajax XMLHttpRequest
- What is the cleanest way to get the progress of JQuery ajax request?
- jQuery has deprecated synchronous XMLHTTPRequest
- A CORS POST request works from plain JavaScript, but why not with jQuery?
- What’s the best way to retry an AJAX request on failure using jQuery?
- jQuery.getJSON – Access-Control-Allow-Origin Issue
- How to upload a file using jQuery.ajax and FormData
- Show a progress bar for downloading files using XHR2/AJAX
- XMLHttpRequest cannot load, No ‘Access-Control-Allow-Origin’ header is present on the requested resource [duplicate]
- Browser waits for ajax call to complete even after abort has been called (jQuery)
- How can I use deflated/gzipped content with an XHR onProgress function?
- Bad Value for attribute href in a in jsp
- How do I pass the this context to a function?
- jQuery .load() / .ajax() not executing javascript in returned HTML after appended
- Why is ‘event’ variable available even when not passed as a parameter?
- css transition doesn’t work if element start hidden
- Uncaught TypeError: undefined is not a function on loading jquery-min.js
- How can I convert a jQuery object to an Element?
- Event propagation in Javascript
- How Can I Truncate A String In jQuery?
- Does Wikipedia API support CORS or only JSONP available?
- Cross-Origin XMLHttpRequest in chrome extensions
- Javascript loading CSV file into an array
- Set Jquery ui active tab on page load/reload
- Does the attr() in jQuery force lowercase?
- Is it possible to wait until all javascript files are loaded before executing javascript code?