Dev UtilitiesLesson 147Free preview
Device Information
This lesson is part of Web Developer Tools · All levels
Summary
The Device Information page displays browser-accessible device data, such as screen resolution, viewport size, device pixel ratio, language, number of CPU cores, memory estimates, and touch support. This data helps when testing responsive display and adjusting application performance. Multiple values are estimated or limited for privacy reasons, so don't consider them to be a definite hardware specification.
Key points
- Screen.width and screen.height indicate the screen resolution
- InnerWidth and innerHeight indicate the size of the viewport
- DevicePixelRatio compares physical pixels to CSS pixels
- HardwareConcurrency and deviceMemory provide estimates of the device's capacity
- Many values are circulated or restricted by browsers for privacy reasons
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.