4 easy steps var serverTimeMillisUTC; var oReq = new XMLHttpRequest(); oReq.onload = function(){ var dateStr = oReq.getResponseHeader('Date'); serverTimeMillisUTC = new Date(Date.parse(dateStr)).getTime(); }; oReq.open("HEAD", "/?foo123", false); oReq.send(); function getServerTime() { for(tvalue in window.performance.getEntriesByType("resource")){ tresource = window.performance.getEntriesByType("resource")[tvalue]; if(tresource.name.indexOf('foo123') > 0){ return serverTimeMillisUTC + (tresource.responseEnd - tresource.responseStart); } } }