{"id":9722,"date":"2024-01-10T18:07:00","date_gmt":"2024-01-10T18:07:00","guid":{"rendered":"https:\/\/codehim.com\/?p=9722"},"modified":"2024-01-22T16:09:25","modified_gmt":"2024-01-22T11:09:25","slug":"javascript-get-client-system-information","status":"publish","type":"post","link":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/","title":{"rendered":"JavaScript Get Client System Information"},"content":{"rendered":"<p>This JavaScript code snippet helps you to get the client system information. It <span class=\"animating\">uses the <\/span><code class=\"animating\">ipinfo.io\/json<\/code><span class=\"animating\"> API to get the visitor&#8217;s information.<\/span><span class=\"animating\"> Similarly, it uses the <\/span><code class=\"animating\">navigator<\/code><span class=\"animating\"> object to get the user agent and devices.<\/span><\/p>\n<p>It displays the visitor&#8217;s information, including IP address, city, region, country, location, and ISP. Likewise, it displays the user agent and devices. You can use this code in your projects for tracking website traffic, personalizing the user experience, and displaying targeted advertising.<\/p>\n<h2>How to Create Javascript Get Client System Information<\/h2>\n<p>1. First of all, load <a href=\"https:\/\/ipinfo.io\/blog\/ip-geolocation-in-javascript\/\" target=\"_blank\" rel=\"noopener\">IP Info JS<\/a> by adding the following CDN link into the head tag of your HTML document.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;script src='https:\/\/jsgetip.appspot.com'&gt;&lt;\/script&gt;<\/pre>\n<p>2. Create the HTML structure where you want to display the visitor information. Place the following code within the body of your HTML file.<\/p>\n<pre class=\"prettyprint linenums lang-html\">&lt;!-- &#x2764;&#xfe0f; --&gt;\r\n&lt;center&gt;\r\n  &lt;h1&gt;Visitor Information&lt;\/h1&gt;\r\n  &lt;br&gt;\r\n  &lt;table class=\"container\"&gt;\r\n    &lt;thead&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;IP Address&lt;\/th&gt;\r\n        &lt;td data-ip&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;City&lt;\/th&gt;\r\n        &lt;td data-city&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;Region&lt;\/th&gt;\r\n        &lt;td data-region&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;Country&lt;\/th&gt;\r\n        &lt;td data-country&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;Location&lt;\/th&gt;\r\n        &lt;td data-loc&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n      &lt;tr&gt;\r\n        &lt;th&gt;ISP&lt;\/th&gt;\r\n        &lt;td data-org&gt;&lt;\/td&gt;\r\n      &lt;\/tr&gt;\r\n    &lt;\/thead&gt;\r\n    &lt;tbody id=\"output\"&gt;\r\n    &lt;\/tbody&gt;\r\n  &lt;\/table&gt;\r\n&lt;\/center&gt;\r\n<\/pre>\n<p>3. Now, include the following CSS code in your project to ensure a visually appealing layout for the visitor information table.<\/p>\n<pre class=\"prettyprint linenums lang-css\">@charset \"UTF-8\";\r\n@import url(https:\/\/fonts.googleapis.com\/css?family=Open + Sans:300, 400, 700);\r\n\r\nbody {\r\n  font-family: \"Open Sans\", sans-serif;\r\n  font-weight: 300;\r\n  line-height: 1.42em;\r\n  color: #a7a1ae;\r\n  background-color: #1f2739;\r\n}\r\n.container th h1 {\r\n  font-weight: bold;\r\n  font-size: 1em;\r\n  text-align: left;\r\n  color: #185875;\r\n}\r\n\r\n.container td {\r\n  font-weight: normal;\r\n  font-size: 1em;\r\n  -webkit-box-shadow: 0 2px 2px -2px #0e1119;\r\n  -moz-box-shadow: 0 2px 2px -2px #0e1119;\r\n  box-shadow: 0 2px 2px -2px #0e1119;\r\n}\r\n\r\n.container {\r\n  text-align: left;\r\n  overflow: hidden;\r\n  width: 80%;\r\n  margin: 0 auto;\r\n  display: table;\r\n  padding: 0 0 8em 0;\r\n}\r\n\r\n.container td,\r\n.container th {\r\n  padding-bottom: 2%;\r\n  padding-top: 2%;\r\n  padding-left: 2%;\r\n}\r\n\r\n\/* Background-color of the odd rows *\/\r\n.container tr:nth-child(odd) {\r\n  background-color: #323c50;\r\n}\r\n\r\n\/* Background-color of the even rows *\/\r\n.container tr:nth-child(even) {\r\n  background-color: #2c3446;\r\n}\r\n\r\n.container th {\r\n  background-color: #1f2739;\r\n}\r\n\r\n.container td:first-child {\r\n  color: #fb667a;\r\n}<\/pre>\n<p>4. Finally, copy and paste the JavaScript code into a <code>&lt;script&gt;<\/code> tag or an external JavaScript file. Ensure that it comes after the HTML content to allow proper manipulation of the DOM.<\/p>\n<pre class=\"prettyprint linenums lang-js\">function saveUserInfo(ui) {\r\n  localStorage.setItem(\"userinfo\", JSON.stringify(userInfo));\r\n}\r\n\r\nfunction getUserInfo() {\r\n  return JSON.parse(localStorage.getItem(\"userinfo\") || \"{}\");\r\n}\r\n\r\nfunction setClassFromObjectProperties(obj, bStorePropAndValue) {\r\n  for (prop in obj) {\r\n    \/\/ Find elements which have \"data-propname\" set. If prop name for instance is \"city\"\r\n    \/\/ These elements will be hit: [span data-city=\"attribut target || 'empty'\" \/]\r\n    \/\/ The \"attribut target\" will be set to the value of the object property.\r\n    \/\/ If you want city to goto \"title\" use: data-target=\"title\".\r\n    \/\/ Leave empty (blank) to set Element innerText\r\n    var sAttributeName = \"data-\" + prop;\r\n    var sAttributeNameIf = \"data-if-\" + prop;\r\n    var valueOfProp = obj[prop];\r\n    var elements = Array.from(\r\n      document.querySelectorAll(\"[\" + sAttributeName + \"]\")\r\n    );\r\n    if (elements.length === 0) {\r\n      console.log(sAttributeName + \" is not used\");\r\n    } else {\r\n      elements.map(function (element, i) {\r\n        var attributeTarget = element.getAttribute(sAttributeName);\r\n        if (attributeTarget !== \"\") {\r\n          \/\/ If the user want the value to be set to a given attribute\r\n          \/\/ we will set that attribute to the value\r\n          element.setAttribute(attributeTarget, valueOfProp);\r\n        } else {\r\n          element.innerText = valueOfProp;\r\n          if (bStorePropAndValue || false) {\r\n            element.setAttribute(\"data-prop\", prop);\r\n            element.setAttribute(\"data-val\", valueOfProp);\r\n          }\r\n        }\r\n        var showIf = element.getAttribute(sAttributeNameIf);\r\n        if (showIf) {\r\n          try {\r\n            let value = valueOfProp;\r\n            element.style.display = eval(showIf) ? \"block\" : \"none\";\r\n            console.log(element.style.display);\r\n          } catch (e) {\r\n            console.log('Could not eval \"' + sAttributeNameIf + '\"');\r\n          }\r\n        }\r\n      });\r\n    }\r\n  }\r\n}\r\n\r\nfunction doRequest(url, cb) {\r\n  var oReq = new XMLHttpRequest();\r\n  oReq.onload = cb;\r\n  oReq.open(\"get\", url, true);\r\n  oReq.send();\r\n}\r\n\r\nfunction reqListener() {\r\n  userInfo = {\r\n    time: new Date(),\r\n    userinfo: JSON.parse(this.responseText)\r\n  };\r\n  saveUserInfo(userInfo);\r\n  setClassFromObjectProperties(userInfo.userinfo, bStorePropAndValue);\r\n  showMore();\r\n}\r\n\r\nfunction showMore() {\r\n  var more = {\r\n    time: new Date(userInfo.time).toUTCString(),\r\n    welcome: bReturning ? \"Welcome back!\" : \"First time here?\"\r\n  };\r\n  setClassFromObjectProperties(more);\r\n}\r\n\r\nvar userInfo = getUserInfo(),\r\n  ipinfo = \"https:\/\/ipinfo.io\/json\",\r\n  bStorePropAndValue = true,\r\n  bReturning = true;\r\n\r\nif (!!!(\"time\" in userInfo)) {\r\n  \/\/ New visitor\r\n  bReturning = false;\r\n  doRequest(ipinfo, reqListener);\r\n} else {\r\n  \/\/ Returning visitor\r\n  setClassFromObjectProperties(userInfo.userinfo, bStorePropAndValue);\r\n  showMore();\r\n}\r\n\r\n\/\/  Get User agent and devices\r\n\/\/  That is pure Javascript\r\nfunction $(selector) {\r\n  const self = {\r\n    element: document.querySelector(selector),\r\n    detect: () =&gt; {\r\n      (function () {\r\n        \"use strict\";\r\n\r\n        var module = {\r\n          options: [],\r\n          header: [\r\n            navigator.platform,\r\n            navigator.userAgent,\r\n            navigator.appVersion,\r\n            navigator.vendor,\r\n            window.opera\r\n          ],\r\n          dataos: [\r\n            { name: \"Windows Phone\", value: \"Windows Phone\", version: \"OS\" },\r\n            { name: \"Windows\", value: \"Win\", version: \"NT\" },\r\n            { name: \"iPhone\", value: \"iPhone\", version: \"OS\" },\r\n            { name: \"iPad\", value: \"iPad\", version: \"OS\" },\r\n            { name: \"Kindle\", value: \"Silk\", version: \"Silk\" },\r\n            { name: \"Android\", value: \"Android\", version: \"Android\" },\r\n            { name: \"PlayBook\", value: \"PlayBook\", version: \"OS\" },\r\n            { name: \"BlackBerry\", value: \"BlackBerry\", version: \"\/\" },\r\n            { name: \"Macintosh\", value: \"Mac\", version: \"OS X\" },\r\n            { name: \"Linux\", value: \"Linux\", version: \"rv\" },\r\n            { name: \"Palm\", value: \"Palm\", version: \"PalmOS\" }\r\n          ],\r\n          databrowser: [\r\n            { name: \"Chrome\", value: \"Chrome\", version: \"Chrome\" },\r\n            { name: \"Firefox\", value: \"Firefox\", version: \"Firefox\" },\r\n            { name: \"Safari\", value: \"Safari\", version: \"Version\" },\r\n            { name: \"Internet Explorer\", value: \"MSIE\", version: \"MSIE\" },\r\n            { name: \"Opera\", value: \"Opera\", version: \"Opera\" },\r\n            { name: \"BlackBerry\", value: \"CLDC\", version: \"CLDC\" },\r\n            { name: \"Mozilla\", value: \"Mozilla\", version: \"Mozilla\" }\r\n          ],\r\n          init: function () {\r\n            var agent = this.header.join(\" \"),\r\n              os = this.matchItem(agent, this.dataos),\r\n              browser = this.matchItem(agent, this.databrowser);\r\n\r\n            return { os: os, browser: browser };\r\n          },\r\n          matchItem: function (string, data) {\r\n            var i = 0,\r\n              j = 0,\r\n              html = \"\",\r\n              regex,\r\n              regexv,\r\n              match,\r\n              matches,\r\n              version;\r\n\r\n            for (i = 0; i &lt; data.length; i += 1) {\r\n              regex = new RegExp(data[i].value, \"i\");\r\n              match = regex.test(string);\r\n              if (match) {\r\n                regexv = new RegExp(data[i].version + \"[- \/:;]([\\\\d._]+)\", \"i\");\r\n                matches = string.match(regexv);\r\n                version = \"\";\r\n                if (matches) {\r\n                  if (matches[1]) {\r\n                    matches = matches[1];\r\n                  }\r\n                }\r\n                if (matches) {\r\n                  matches = matches.split(\/[._]+\/);\r\n                  for (j = 0; j &lt; matches.length; j += 1) {\r\n                    if (j === 0) {\r\n                      version += matches[j] + \".\";\r\n                    } else {\r\n                      version += matches[j];\r\n                    }\r\n                  }\r\n                } else {\r\n                  version = \"0\";\r\n                }\r\n                return {\r\n                  name: data[i].name,\r\n                  version: parseFloat(version)\r\n                };\r\n              }\r\n            }\r\n            return { name: \"unknown\", version: 0 };\r\n          }\r\n        };\r\n\r\n        var e = module.init(),\r\n          debug = \"\";\r\n\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Os\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          e.os.name +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Os Version\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          e.os.version +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Browser\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          e.browser.name +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Browser Version\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          e.browser.version +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"User Agent\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          navigator.userAgent +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"App Version\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          navigator.appVersion +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Platform Version\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          navigator.platform +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n        debug +=\r\n          \"&lt;tr&gt;\" +\r\n          \"&lt;th&gt;\" +\r\n          \"Vendor\" +\r\n          \"&lt;\/th&gt;\" +\r\n          \"&lt;td&gt;\" +\r\n          navigator.vendor +\r\n          \"&lt;\/td&gt;\" +\r\n          \"&lt;\/tr&gt;\";\r\n\r\n        self.element.innerHTML = debug;\r\n      })();\r\n    },\r\n    date: () =&gt; {\r\n      let time = new Date();\r\n      self.element.innerHTML = time;\r\n    }\r\n  };\r\n\r\n  return self;\r\n}\r\n\r\nsetInterval(function () {\r\n  for (let i = 0; i &lt; 16; i++) {\r\n    $(\"#output\").detect();\r\n  }\r\n}, 1000);<\/pre>\n<p>That&#8217;s all! hopefully, you have successfully created a functionality to get client system information in JavaScript. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This JavaScript code snippet helps you to get the client system information. It uses the ipinfo.io\/json API to get the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9727,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[116],"tags":[],"class_list":["post-9722","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vanilla-javascript"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Get Client System Information &#8212; CodeHim<\/title>\n<meta name=\"description\" content=\"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Get Client System Information &#8212; CodeHim\" \/>\n<meta property=\"og:description\" content=\"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\" \/>\n<meta property=\"og:site_name\" content=\"CodeHim\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codehimofficial\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-10T18:07:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T11:09:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Asif Mughal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:site\" content=\"@CodeHimOfficial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Asif Mughal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\"},\"author\":{\"name\":\"Asif Mughal\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\"},\"headline\":\"JavaScript Get Client System Information\",\"datePublished\":\"2024-01-10T18:07:00+00:00\",\"dateModified\":\"2024-01-22T11:09:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\"},\"wordCount\":213,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png\",\"articleSection\":[\"Vanilla JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\",\"url\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\",\"name\":\"JavaScript Get Client System Information &#8212; CodeHim\",\"isPartOf\":{\"@id\":\"https:\/\/codehim.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png\",\"datePublished\":\"2024-01-10T18:07:00+00:00\",\"dateModified\":\"2024-01-22T11:09:25+00:00\",\"description\":\"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.\",\"breadcrumb\":{\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage\",\"url\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png\",\"contentUrl\":\"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png\",\"width\":1280,\"height\":960,\"caption\":\"JavaScript Get Client System Information\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/codehim.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vanilla JavaScript\",\"item\":\"https:\/\/codehim.com\/category\/vanilla-javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Get Client System Information\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/codehim.com\/#website\",\"url\":\"https:\/\/codehim.com\/\",\"name\":\"CodeHim\",\"description\":\"Web Design Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/codehim.com\/#organization\"},\"alternateName\":\"Web Design Codes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/codehim.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/codehim.com\/#organization\",\"name\":\"CodeHim - Web Design Code & Scripts\",\"url\":\"https:\/\/codehim.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"contentUrl\":\"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg\",\"width\":280,\"height\":280,\"caption\":\"CodeHim - Web Design Code & Scripts\"},\"image\":{\"@id\":\"https:\/\/codehim.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/codehimofficial\",\"https:\/\/x.com\/CodeHimOfficial\",\"https:\/\/www.instagram.com\/codehim\/\",\"https:\/\/www.linkedin.com\/company\/codehim\",\"https:\/\/co.pinterest.com\/codehim\/\",\"https:\/\/www.youtube.com\/@codehim\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed\",\"name\":\"Asif Mughal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/codehim.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g\",\"caption\":\"Asif Mughal\"},\"description\":\"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.\",\"sameAs\":[\"https:\/\/codehim.com\"],\"url\":\"https:\/\/codehim.com\/author\/asif-mughal\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Get Client System Information &#8212; CodeHim","description":"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Get Client System Information &#8212; CodeHim","og_description":"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.","og_url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/","og_site_name":"CodeHim","article_publisher":"https:\/\/www.facebook.com\/codehimofficial","article_published_time":"2024-01-10T18:07:00+00:00","article_modified_time":"2024-01-22T11:09:25+00:00","og_image":[{"width":1280,"height":960,"url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png","type":"image\/png"}],"author":"Asif Mughal","twitter_card":"summary_large_image","twitter_creator":"@CodeHimOfficial","twitter_site":"@CodeHimOfficial","twitter_misc":{"Written by":"Asif Mughal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#article","isPartOf":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/"},"author":{"name":"Asif Mughal","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed"},"headline":"JavaScript Get Client System Information","datePublished":"2024-01-10T18:07:00+00:00","dateModified":"2024-01-22T11:09:25+00:00","mainEntityOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/"},"wordCount":213,"commentCount":0,"publisher":{"@id":"https:\/\/codehim.com\/#organization"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png","articleSection":["Vanilla JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/","url":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/","name":"JavaScript Get Client System Information &#8212; CodeHim","isPartOf":{"@id":"https:\/\/codehim.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage"},"image":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage"},"thumbnailUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png","datePublished":"2024-01-10T18:07:00+00:00","dateModified":"2024-01-22T11:09:25+00:00","description":"Here is a free code snippet to create a JavaScript Get Client System Information. You can view demo and download the source code.","breadcrumb":{"@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#primaryimage","url":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png","contentUrl":"https:\/\/codehim.com\/wp-content\/uploads\/2023\/11\/JavaScript-Get-Client-System-Information.png","width":1280,"height":960,"caption":"JavaScript Get Client System Information"},{"@type":"BreadcrumbList","@id":"https:\/\/codehim.com\/vanilla-javascript\/javascript-get-client-system-information\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codehim.com\/"},{"@type":"ListItem","position":2,"name":"Vanilla JavaScript","item":"https:\/\/codehim.com\/category\/vanilla-javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Get Client System Information"}]},{"@type":"WebSite","@id":"https:\/\/codehim.com\/#website","url":"https:\/\/codehim.com\/","name":"CodeHim","description":"Web Design Code Snippets","publisher":{"@id":"https:\/\/codehim.com\/#organization"},"alternateName":"Web Design Codes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codehim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codehim.com\/#organization","name":"CodeHim - Web Design Code & Scripts","url":"https:\/\/codehim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/","url":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","contentUrl":"http:\/\/codehim.com\/wp-content\/uploads\/2023\/06\/Codehim-short-logo.jpg","width":280,"height":280,"caption":"CodeHim - Web Design Code & Scripts"},"image":{"@id":"https:\/\/codehim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codehimofficial","https:\/\/x.com\/CodeHimOfficial","https:\/\/www.instagram.com\/codehim\/","https:\/\/www.linkedin.com\/company\/codehim","https:\/\/co.pinterest.com\/codehim\/","https:\/\/www.youtube.com\/@codehim"]},{"@type":"Person","@id":"https:\/\/codehim.com\/#\/schema\/person\/cc48f1dbe072a89a62a98171b7db43ed","name":"Asif Mughal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codehim.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b25bfcd7d4e341c2c6f785a88d8ad2a4?s=96&d=mm&r=g","caption":"Asif Mughal"},"description":"I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences. I truly enjoy what I'm doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.","sameAs":["https:\/\/codehim.com"],"url":"https:\/\/codehim.com\/author\/asif-mughal\/"}]}},"views":2254,"_links":{"self":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/comments?post=9722"}],"version-history":[{"count":0,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/posts\/9722\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media\/9727"}],"wp:attachment":[{"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/media?parent=9722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/categories?post=9722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codehim.com\/wp-json\/wp\/v2\/tags?post=9722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}