JavaScript: Get User Agent, Cookie Enabled Status

By Xah Lee. Date: . Last updated: .

Here is how to find the browser (User Agent) used, and Cookie Enabled Status.

The object navigator stores info about browser.

Here's your browser status:

Here is the code.

<div id="outputBox13302"></div>
{
  document.getElementById("outputBox13302").innerHTML = `<ul>
<li><b>navigator.userAgent:</b> ${navigator.userAgent}</li>
<li><b>navigator.cookieEnabled:</b> ${navigator.cookieEnabled}</li>
</ul>`;
}
BUY Ξ£JS JavaScript in Depth