The browser Capabitlities Compoent
In order to adequately support the various browsers ued by consumers,
we need to determine what they are using and what the capabilities
of the browser are. The HTTP_USER_AGENT returns the type of browser
accessing your web page.
MSWC.BrowserType-- This component reads the Browscap.ini file located
in:
windows\system32\inetsrv--Windows XP
window\system\inetsrv--Windows 95
winnt\system32\inetsrv--Windows NT
and sets various properties in the object which indicate the abilities
of the browser.
Example--Determine if the user's browser supports VBscript
<%Option Explicit%>
<% Dim objBCap, blnVBScriptOK
Set objBCap = Server.CreateObject ("MSWC.BrowserType")
blnVBScriptOK = objBCap.vbscript 'save the value in a variable
If blnVBScriptOK then
Response.Write "This Browser supports VBScript"
else
Response.write "This Browser doesn't support VBScript"
end if
%>
|
| |