please dont rip this site

Browser Capabilities Component

The Browser Capabilities component provides your scripts with a description of the capabilities of the client’s Web browser.

When a browser connects to the Web server, it automatically sends a User Agent HTTP header. This header is an ASCII string that identifies the browser and its version number. The Browser Capabilities component compares the header to entries in the Browscap.ini file.

If it finds a match, the Browser Capabilities component assumes the properties of the browser listing that matched the User Agent header.

If the component does not find a match for the header in the Browscap.ini file, it takes on the default browser properties. If the component does not find a match and default browser settings have not been specified in the Browscap.ini file, it sets every property to the string “UNKNOWN”.

You can add properties or new browser definitions to this component simply by updating the Browscap.ini file.

File Names

Browscap.dll

The Browser Capabilities component.

Browscap.ini

A text file that maps browser capabilities to the HTTP User Agent header. This file must be in the same directory as Browscap.dll.

Syntax

Set BrowserType = Server.CreateObject("MSWC.BrowserType")

Parameters

BrowserType

Specifies the name of the object created by the call to Server.CreateObject.

Registry Entries

None.

Example

The following example uses the Browser Capabilities component to display a table showing some of the capabilities of the current browser.

<%  Set bc = Server.CreateObject("MSWC.BrowserType") %>  
<table border=1>
<tr><td>Browser</td><td> <%= bc.browser %>
<tr><td>Version</td><td> <%= bc.version %> </td></TR>
<tr><td>Frames</td><td>
<% if (bc.frames = TRUE) then %> TRUE
<% else %> FALSE
<% end if %> </td></TR>
<tr><td>Tables</td><td>
<% if (bc.tables = TRUE) then %> TRUE
<% else %> FALSE
<% end if %> </td></TR>
<tr><td>BackgroundSounds</td><td>
<% if (bc.BackgroundSounds = TRUE) then %> TRUE
<% else %> FALSE
<% end if %> </td></TR>
<tr><td>VBScript</td><td>
<% if (bc.vbscript = TRUE) then %> TRUE
<% else %> FALSE
<% end if %> </td></TR>
<tr><td>JScript</td><td>
<% if (bc.javascript = TRUE) then %> TRUE
<% else %> FALSE
<% end if %> </td></TR>
</table>

© Microsoft Corporation. All rights reserved.

See also:


file: /Techref/language/asp/comp/compref_10.htm, 3KB, , updated: 1996/11/21 18:01, local time: 2017/12/11 03:40,
TOP NEW HELP FIND: 
54.221.73.186:LOG IN

 ©2017 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE! / 

<A HREF="http://www.piclist.com/techref/language/asp/comp/compref_10.htm"> Browser Capabilities Component</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

  PICList 2017 contributors:
o List host: MIT, Site host massmind.org, Top posters @20171211 RussellMc, Van Horn, David, Sean Breheny, James Cameron, alan.b.pearce, IVP, Neil, Bob Blick, David C Brown, John Gardner,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
 

Welcome to www.piclist.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .