Skip to content

Instantly share code, notes, and snippets.

View varun93's full-sized avatar
🎯
Focusing

Varun varun93

🎯
Focusing
  • Seattle, WA
View GitHub Profile
@phamann
phamann / Network-Timing-API.js
Last active August 9, 2020 03:00
Example of gathering request timing information using the Navigation timing API
function getPerformanceData() {
var perf = window.performance || window.msPerformance || window.webkitPerformance || window.mozPerformance;
if (perf) {
var t = perf.timing;
return [
// Time required for domain lookup.
t.domainLookupEnd - t.domainLookupStart,
// Time to establish a connection to server.
t.connectEnd - t.connectStart,