Script

<div id="resultDiv"></div>
<script>
	function getBrowser() {
		var identifier = ["MSIE", "Firefox", "Safari", "Chrome", "Opera"];
		var browser = ["Microsoft Internet Explorer", "Mozilla Firefox", "Apple Safari", "Google Chrome", "Opera"];
		for (var idx = identifier.length - 1; idx > -1 && navigator.userAgent.indexOf(identifier[idx]) === -1; idx--);
		return browser[idx];
	}

	var resultDiv = document.getElementById("resultDiv");
	resultDiv.innerHTML = "<div>- hostname: " + location.hostname + "</div>";
	resultDiv.innerHTML += "<div>- userAgent: " + navigator.userAgent + "</div>";
	resultDiv.innerHTML += "<div>- oscpu: " + navigator.oscpu + "</div>";
	resultDiv.innerHTML += "<div>- platform: " + navigator.platform + "</div>";
	resultDiv.innerHTML += "<div>- appName: " + navigator.appName + "</div>";
	resultDiv.innerHTML += "<div>- appVersion: " + navigator.appVersion + "</div>";
	navigator.geolocation.getCurrentPosition(function(position) {
		resultDiv.innerHTML += "<div>- geo.latitude: " + position.coords.latitude + "</div>";
		resultDiv.innerHTML += "<div>- geo.longitude: " + position.coords.longitude + "</div>";
	});

	resultDiv.innerHTML += "<div>- vendor: " + navigator.vendor + "</div>";
	resultDiv.innerHTML += "<div>- build ID: " + navigator.buildID + "</div>";
	resultDiv.innerHTML += "<div>- browser ID: " + getBrowser() + "</div>";
</script>


Demo

티스토리 툴바