The ASP Browser Capabilities component creates a BrowserType object that determines the type, capabilities and version number of a visitor's browser.
When a browser connects to a server, a User Agent header is also sent to the server. This header contains information about the browser.
The BrowserType object compares the information in the header with information in a file on the server called "Browscap.ini".
If there is a match between the browser type and version number in the header and the information in the "Browsercap.ini" file, the BrowserType object can be used to list the properties of the matching browser. If there is no match for the browser type and version number in the Browscap.ini file, it will set every property to "UNKNOWN".
The example below creates a BrowserType object in an ASP file, and displays some of the capabilities of your browser:
Output:
The "Browsercap.ini" file is used to declare properties and to set default values for browsers.
This section is not a tutorial on how to maintain "Browsercap.ini" files, it only shows you the basics; so you get an idea what a "Browsercap.ini" file is all about.
The "Browsercap.ini" file can contain the following:
A "Browsercap.ini" file might look something like this:
Your Query was successfully sent!