Detect your device's userAgent, devicePixelRatio, viewport, and breakdown the anatomy of a URL. This page will help you to diagnose the values provided through standard JavaScript APIs about your device and browser.
URL Breakdown.
window.location
{ - hash: "",
- host: "briananders.net",
- hostname: "briananders.net",
- href: "https://briananders.net/posts/browser-and-device-diagnostics/",
- origin: "https://briananders.net",
- pathname: "/posts/browser-and-device-diagnostics/",
- port: "",
- protocol: "https:",
- search: ""
}
Your device's userAgent
window.navigator.userAgent
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Your browser's viewport
window.visualViewport
{ - width: "1280",
- height: "720",
- scale: "1",
}