Jquery User Agent

User Agent script, allows to detect the browser and operating system details easily.


  • Simple script that grabs the user agent.
  • Provides the name of the browser and operating system. It also gives the details of the browser version and OS platform.
  • Responsive and easy to integrate.


Jquery User Agent
Operating System


<!--Scripts by hscripts.com-->
<!--More scripts @ www.hscripts.com-->

var name='';
var version='';
var platform='';
var os='';
function get_browsername(){

if($.browser.chrome){name='Chrome';return name;}
if ($.browser.mozilla){name='Mozilla';return name;}
if( $.browser.safari ){name='Safari';return name;
if( $.browser.opera){
name='Opera';return name;}

if ($.browser.msie && $.browser.version){
name='IE';return name;}

function get_browserversion()
version=$.browser.version;return version;}
function get_platform()
platform=navigator.platform;return platform;}
function get_os()
if(navigator.userAgent.indexOf("Win")!= -1){os="Windows";return os;
else if (navigator.userAgent.indexOf("Mac")!= -1){os="MacOS";return os;
else if (navigator.userAgent.indexOf("Ubuntu") != -1){os="Ubuntu";return os;
if (navigator.appVersion.indexOf("X11")!=-1) {
os="Linux";return os;}
if (navigator.appVersion.indexOf("Linux")!=-1) {
os="Linux";return os;}



  • Release Date - 10-06-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com


  • Copy and paste the above code into your HTML page.
  • User agent functionality is based on the browser conditions.
  • The function get_browsername() returns the name of the browser, get_browserversion() returns the browser version, get_platform() returns the platform of the browser and get_os() returns the name of the operating system.


  • This Jquery code is given under GPL License
  • i.e. Free use for those who use the codes as it is.
  • Free, if your modification does not remove our copyright information and links.
  • Detailed License information can be found here.
  • You can purchase the script if your requirements does not meet our GPL License terms.

Related Scripts

Jquery Download

Ask Questions

Ask Question