Dmitry Bubnenkov
Dmitry Bubnenkov

Reputation: 9859

How to detect client OS via HTTP?

What is the best way to detect the OS running on an HTTP client? I know that the browser's User-Agent may be falsified. So should I use handle of HTTP? And is there any difference between HTTP packets sent from WinXP and Win7? I only need to detect these.

Upvotes: 1

Views: 793

Answers (1)

Konrad Reiche
Konrad Reiche

Reputation: 29503

The User Agent String for Windows XP is Windows NT 5.1 or Windows XP.

For instance in JavaScript the necessary string is returned with:

function osInfo() { 
  alert(window.navigator.oscpu); 
}
// returns: "Windows NT 6.0" for example

Upvotes: 1

Related Questions