Avatar of duncanb7
duncanb7
 asked on

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

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
http://msdn.microsoft.com/library/ms537503.aspx, 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
http://ark.intel.com/products/51680/Intel-Pentium-Processor-P6300-3M-Cache-2_27-GHz
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

Duncan



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)
   fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1)
   fullVersion=fullVersion.substring(0,ix);

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.getElementById("example").innerHTML=txt;
document.write("<div id='browser'>"+txt+"</div>");

Open in new window

Microsoft Legacy OSJavaScriptWeb Browsers

Avatar of undefined
Last Comment
duncanb7

8/22/2022 - Mon
SOLUTION
David S.

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
duncanb7

ASKER
So my CPU is intel 64 bit, right ?
SOLUTION
David S.

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
duncanb7

ASKER
So is it strange, 64 bit CPU not using 64-bit window system/or other 64 bit system ?
probably, you mean 32 bit and 64 bit window system is not different on Intel 64 bit proccessor if the RAM is less than 4GB, right ?
ASKER CERTIFIED SOLUTION
David S.

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
duncanb7

ASKER
Thanks for your reply

Have a nice day

Duncan
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23