Created
August 6, 2014 09:26
-
-
Save denieler/de7c74a2e21dd084c0c5 to your computer and use it in GitHub Desktop.
Get Network information from Chrome Developers Tool Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var network = /*place data*/ | |
$.each( network.log.entries, function(index, entry){ | |
var url = entry.request.url; | |
var filename = url.substring(url.lastIndexOf('/')+1); | |
if(filename.indexOf('?')>0) | |
{ | |
filename = filename.slice(0, filename.indexOf('?')); | |
} | |
var time = entry.time.replace('.',','); | |
var startedDateTime = entry.startedDateTime; | |
var getLocation = function(href) { | |
var l = document.createElement("a"); | |
l.href = href; | |
return l; | |
}; | |
var l = getLocation(url); | |
console.log(startedDateTime, ';', filename, ';', url, ';', l.hostname, ';', time); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment