Entries Tagged 'Browsers' ↓

Identify the browser used by the client

You may want to know the details of the browser used by the various visitors to your site. Lets see how the navigator object can be used to identify the browser details of the user. The navigator object has a property named ‘appName’ which will do the trick.The code below is all that is needed:

navigator.appName

For Ex.

function identifyBrowser()

{

alert(“You seem to be working on the “+navigator.appName+” browser”);

}

The navigator method has a few other properties like:

appCodeName

appVersion

language

mimeTypes[]

platform

plugins[]

userAgent

Click here to view the example