<!DOCTYPE html>
<html>
<body>
<p>Display the user-agent header sent by the browser to the server.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML =
navigator.userAgent;
}
</script>
</body>
</html>