window.screen
provides information about the desktop outside the browser.
For example the screen.colorDepth
property contains the color bit-depth (the color quality) of the monitor.
window.screen.colorDepth //32
You can also check the available screen real estate (the resolution).
screen.width //1440 screen.availWidth //1440 screen.height //900 screen.availHeight //847
The difference between height
and availHeight
is that the height is the total resolution, while availHeight
subtracts any operating system menus such as the Windows task bar. The same is the case for width
and availWidth
.
Property | Description |
---|---|
availHeight | Returns the height of the screen (excluding the Windows Taskbar) |
availWidth | Returns the width of the screen (excluding the Windows Taskbar) |
colorDepth | Returns the bit depth of the color palette for displaying images |
height | Returns the total height of the screen |
pixelDepth | Returns the color resolution (in bits per pixel) of the screen |
width | Returns the total width of the screen |