<!DOCTYPE html>
<html>
<body>
<p>Number of URLs in history list:</p>
<p id="demo"></p>
<p><strong>Note:</strong> This example is opened in a new frame and will be treated as a new "session".</p>
<script>
var x = history.length;
document.getElementById("demo").innerHTML = x;
</script>
</body>
</html>