troubleshooting Question

User-agent and navigator.platform, WOW64 on notebook computer

Avatar of duncanb7
duncanb7 asked on
JavaScriptWeb BrowsersMicrosoft Legacy OS
6 Comments3 Solutions1761 ViewsLast Modified:
Dear Experts,
I have used the following javascript code to get all browser and my computer infomation
I got the user-agent  and platform as follows
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Platform: Win32
After checking user-agent defination on this site of MS, where "WOW64" means
A 32-bit version of Internet Explorer is running on a 64-bit processor
and Windows NT6.1 means Window 7 operation system
so I go to check my notebook intel CPU, Intel(R) Pentium(R) CPU at
which said the instruction set is 64 bit and dual cores .

My question is
Question-1: My intel process is 64 bit CPU processor, right ? If right, "WOW64" is correct
on my notebook since I am using window7(Windows NT 6.1) which is window 32-bit described on javascript code of navigator.platform(Win).

Question-2: If what I said on question-1 all are correct, I should need to re-install
window 7 for 64 bit instead of  32 bit in order to speed up my window process, Right ?

Question-3: I don't know why my notebook will install 32-bit window 7 with intel 64 bit
processor ? Is it because the computer  vendor wants to save cost for selling ?

Please advise and hope you understand my question


javascript extract User-Agent and Platform
var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName  = navigator.appName;
var fullVersion  = ''+parseFloat(navigator.appVersion); 
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;

// In Opera, the true version is after "Opera" or after "Version"
if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
 browserName = "Opera";
 fullVersion = nAgt.substring(verOffset+6);
 if ((verOffset=nAgt.indexOf("Version"))!=-1) 
   fullVersion = nAgt.substring(verOffset+8);
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
 browserName = "Microsoft Internet Explorer";
 fullVersion = nAgt.substring(verOffset+5);
// In Chrome, the true version is after "Chrome" 
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
 browserName = "Chrome";
 fullVersion = nAgt.substring(verOffset+7);
// In Safari, the true version is after "Safari" or after "Version" 
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
 browserName = "Safari";
 fullVersion = nAgt.substring(verOffset+7);
 if ((verOffset=nAgt.indexOf("Version"))!=-1) 
   fullVersion = nAgt.substring(verOffset+8);
// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
 browserName = "Firefox";
 fullVersion = nAgt.substring(verOffset+8);
// In most other browsers, "name/version" is at the end of userAgent 
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < 
          (verOffset=nAgt.lastIndexOf('/')) ) 
 browserName = nAgt.substring(nameOffset,verOffset);
 fullVersion = nAgt.substring(verOffset+1);
 if (browserName.toLowerCase()==browserName.toUpperCase()) {
  browserName = navigator.appName;
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1)
if ((ix=fullVersion.indexOf(" "))!=-1)

majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
 fullVersion  = ''+parseFloat(navigator.appVersion); 
 majorVersion = parseInt(navigator.appVersion,10);

txt ="<p id='pd0'>Browser name  ="+browserName+'</p>';
txt+="<p id='pd1'>Full version  = "+fullVersion+'</p>'
txt+="<p id='pd2'>Major version = "+majorVersion+'</p>'
txt+="<p id='pd3'>navigator.appName = "+navigator.appName+'</p>'
txt+="<p id='pd4'>navigator.userAgent = "+navigator.userAgent+'</p>'

txt+= "<p id='pd5'>Browser CodeName: " + navigator.appCodeName + "</p>";
txt+= "<p id='pd6'>Browser Name: " + navigator.appName + "</p>";
txt+= "<p id='pd7'>Browser Version: " + navigator.appVersion + "</p>";
txt+= "<p id='pd8'>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt+= "<p id='pd9'>Platform: " + navigator.platform + "</p>";
txt+= "<p id='pd10'>User-agent header: " + navigator.userAgent + "</p>";

document.write("<div id='browser'>"+txt+"</div>");
David S.
Consultant & Challenge Subduer
Join our community to see this answer!
Unlock 3 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros