Window Screen Object

Window Screen Object

The screen object contains information about the visitor's screen.

Screen object properties

Property Description
availHeight Returns the screen height (excluding the Windows taskbar).
availWidth Returns the screen width (excluding the Windows taskbar).
colorDepth Returns the bit depth of the palette used to display images.
height Returns the total height of the screen.
pixelDepth Returns the color resolution (number of bits per pixel) of the screen.
width Returns the total width of the screen.

Description of Screen object

Each screen property of a Window object refers to a Screen object. The Screen object contains information about the display browser screen. JavaScript programs use this information to optimize their output to meet the user's display requirements. For example, a program can choose to use large or small images based on the size of the monitor, and it can also choose to use 16-bit or 8-bit graphics based on the color depth of the monitor. Additionally, JavaScript programs can use information about the screen size to position new browser windows in the center of the screen.

Other related properties

Property Description
bufferDepth Sets or returns the bit depth of the palette.
deviceXDPI Returns the number of horizontal pixels per inch on the display screen.
deviceYDPI Returns the number of vertical pixels per inch on the display screen.
fontSmoothingEnabled Returns whether the user has enabled font smoothing in the display control panel.
logicalXDPI Returns the conventional dot per inch in the horizontal direction of the display screen.
logicalYDPI Returns the conventional dot per inch in the vertical direction of the display screen.
updateInterval Sets or returns the screen refresh rate.