Skip to content

Instantly share code, notes, and snippets.

@DEARaison
Created November 6, 2023 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DEARaison/7a0b096a46bf4184528011b0bbf3367e to your computer and use it in GitHub Desktop.
Save DEARaison/7a0b096a46bf4184528011b0bbf3367e to your computer and use it in GitHub Desktop.
The Window Navigator Object navigator.onLine
<!DOCTYPE html>
<html>
<body>
<h1>The Window Navigator Object</h1>
<h2>All Properties</h2>
<div id="demo"></div>
<script>
let text = "<p>Browser CodeName: " + navigator.appCodeName + "</p>" +
"<p>Browser Name: " + navigator.appName + "</p>" +
"<p>Browser Version: " + navigator.appVersion + "</p>" +
"<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>" +
"<p>Browser Language: " + navigator.language + "</p>" +
"<p>Browser Online: " + navigator.onLine + "</p>" +
"<p>Platform: " + navigator.platform + "</p>" +
"<p>User-agent header: " + navigator.userAgent + "</p>";
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment