Reputation: 109
I am using the following code to detect if the client has Windows XP:
if(navigator.appVersion.indexOf('Windows NT 5.1') > -1)
$('#isXP').modal('show');
This works perfectly on Chrome and IE. But not in IE8 and Firefox.
Any idea how can I detect it?
Upvotes: 0
Views: 842
Reputation: 4153
you can also you navigator.userAgent, like so:
navigator.userAgent.indexOf('Windows NT 5.1') != -1
Upvotes: 3