$Web Browser: Difference between revisions
(Created page with "{{DISPLAYTITLE:$Web_Browser}} <span class="pageSubtitle"><section begin="desc" />Retrieve browser version<section end="desc" /></span> $Web_Browser retrieves the version of th...") |
m (1 revision) |
(No difference)
|
Revision as of 21:38, 21 February 2011
<section begin="desc" />Retrieve browser version<section end="desc" />
$Web_Browser retrieves the version of the requested browser using the User-agent request header.
Syntax
<section begin="syntax" /> %VSN = $Web_Browser( brand ) <section end="syntax" />
$Web_Browser accepts one required argument and returns a number containing the version of the indicated browser or 0 if the browser is not of the indicated type.
brand | The type of browser for which version is to be checked. |
---|
Returns the release of specified browser or 0 if not that browser. Valid browsers are
IE | for Microsoft Internet Explorer&TRADEMARK., |
---|---|
NS | for Netscape Navigator&TRADEMARK. |
OPERA | for, you guessed it, Opera&TRADEMARK.. |
This function is useful for testing browser type and release:
IF $Web_Browser('IE') THEN
for example, is useful for testing if the browser is any release of Internet Explorer and a
IF $Web_Browser('NS') GE 6 THEN
is useful for testing if the browser is a Netscape Navigator release 6 or later.