ASP Browser Capabilities

ASP Browser Capabilities Component

The ASP Browser Capabilities segment makes a BrowserType object that decides the sort, abilities and variant number of a guest's browser.

When a program interfaces with a server, a User Agent header is likewise sent to the server. This header contains data about the browser.

The BrowserType object contrasts the data in the header and data in a document on the server called "Browscap.ini".

If there is a match between the program type and form number in the header and the data in the "Browscap.ini" document, the BrowserType object can be utilized to list the properties of the coordinating program. In the event that there is no counterpart for the program type and form number in the Browscap.ini document, it will set each property to "UNKNOWN".


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

ASP Browser Capabilities Example

The model beneath makes a BrowserType object in an ASP record, and shows a portion of the abilities of your browser:


<!DOCTYPE html>
Set MyBrow=Server.CreateObject("MSWC.BrowserType")

<table border="0" width="100%">
<th>Client OS</th><th><%=MyBrow.platform%></th>
<td >Web Browser</td><td ><%=MyBrow.browser%></td>
<td>Browser version</td><td><%=MyBrow.version%></td>
<td>Frame support?</td><td><%=MyBrow.frames%></td>
<td>Table support?</td><td><%=MyBrow.tables%></td>
<td>Sound support?</td><td><%=MyBrow.backgroundsounds%></td>
<td>Cookies support?</td><td><%=MyBrow.cookies%></td>
<td>VBScript support?</td><td><%=MyBrow.vbscript%></td>
<td>JavaScript support?</td><td><%=MyBrow.javascript%></td>



Client OS WinNT
Web Browser IE
Browser version 5.0
Frame support? True
Table support? True
Sound support? True
Cookies support? True
VBScript support? True
JavaScript support? True