How It Works
Latency can be used to determine how far away a user is from the web server. If you know the client IP, the latency should be within a certain range. This data point is very useful for detecting miscreants on proxy servers, that may be proxing through your client machines and connecting to your system as the client. In cases where a proxy is deployed between the user agent and the web server, the time interval between the connectStart and the connectEnd attributes indicates the delay between the user agent and the proxy instead of the web server. With that, the web server can potentially infer the existence of the proxy. For SOCKS proxy, this time interval includes the proxy authentication time and the time the proxy takes to connect to the web server, which obfuscate the proxy detection. In case of an HTTP proxy, the user agent might not have any knowledge about the proxy server at all so it's not always feasible to mitigate this attack.
The following figure illustrates the timing attributes defined by the PerformanceTiming interface and the PerformanceNavigation interface with or without redirect, respectively. Attributes underlined may not be available in navigation involving documents from different origins. User agents may perform internal processing in between timings, which allow for non-normative intervals between timings.
Entropy Estimate: 4.3 bits
Unlike other code on the Internet we do everything possible to verify our code for you. In order to minimize problems and maximize compatibility this code has been verified with JSLint and has been extensively tested with over 1100 OS/Browser combinations using BrowserStack.
Navigation Timing. (n.d.). In W3C. Retrieved September 04, 2017, from http://www.w3.org/TR/navigation-timing/
PerformanceTiming. (August 15, 2017). In MDM Web Docs. Retrieved September 16, 2017, from https://developer.mozilla.org/en-US/docs/Web/API/PerformanceTiming