Main Page

screen object

Property/Method Description
IE Moz Op Saf
onLine
Boolean indicating if the browser is attached
X – – –
to the Internet
oscpu
String representing the operating system or the CPU – X – –
platform
String representing the computer platform that X X X X
the browser is running on
plugins
Array of plugins installed in the browser
X X X X
preference()
Function used to set browser preferences
– X X –
product
String representing the name of the product
– X – X
(typically
“Gecko”
)
productSub
String representing extra information about
– X – X
the product (typically the Gecko version)
opsProfile
–– ––
securityPolicy
–X––
systemLanguage
* String representing the operating system’s language X – – –
taintEnabled()
Boolean indicating if data tainting is enabled
X X X X
userAgent
String representing the user-agent header string X X X X
userLanguage
* String representing the operating system’s language X – – –
userProfile
Object allowing access to the browser user profile X – – –
vendor
String representing the name of the branded
– X – X
browser (typically
“Netscape6”
or
“Netscape”
)
vendorSub
String representing extra information for the
– X – X
branded browser (typically the version of Netscape)
* Most of the time,
browserLanguage
,
systemLanguage
, and
userLanguage
are the same.
The
navigator
object is extremely helpful in determining what browser is being used to view a page.
A quick search of the Internet reveals any number of methodologies for browser detection, all of which
make extensive use of
navigator
. Browser and operating-system detection using the
navigator
object
is discussed in greater detail in Chapter 9.
The screen object
Although most information about the user ’s system is hidden for security reasons, it is possible to get a
certain amount of information about the user ’s monitor using the
screen
object (which, you may have
already guessed, is a property of
window
as well).
156
Chapter 5
08_579088 ch05.qxd 3/28/05 11:37 AM Page 156


JavaScript EditorFree JavaScript Editor     Ajax Editor


©