Saturday, January 8, 2011

Access Browser Information Using JavaScript

<script type="text/javascript">


document.write("Browser CodeName: " + navigator.appCodeName);

document.write("<br /><br />");

document.write("Browser Name: " + navigator.appName);

document.write("<br /><br />");

document.write("Browser Version: " + navigator.appVersion);

document.write("<br /><br />");

document.write("Cookies Enabled: " + navigator.cookieEnabled);

document.write("<br /><br />");

document.write("Platform: " + navigator.platform);

document.write("<br /><br />");

document.write("User-agent header: " + navigator.userAgent);


</script>



it will give o/p as (for my computer) :


Browser CodeName: Mozilla

Browser Name: Opera

Browser Version: 9.80 (Windows NT 5.1; U; en)

Cookies Enabled: true

Platform: Win32

User-agent header: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.51

No comments:

Post a Comment