Several large extensible components of ASP (ii)

Source: Internet
Author: User
Tags definition comments header ini
several large extensible components of ASP (ii)

Last time we talked about how to use the browser performance component (Browser capabilities Component), this article goes back to how to write or upgrade Browsercap.ini files.

Browscap.ini File

You can describe the properties of any number of browsers in the Browscap.ini file. You can also set default properties, and the browser type (Browertype) object assumes that the browser has a default property when the header sent by the browser cannot match any of the entries in the Browscap.ini.

Each browser definition consists of an HTTP header, some property names, and related property values. The definitions of HTTP headers for various browsers refer to the contents of the [Link]http://www.w3.org/[/link] Web site.

Grammar
[; comments]
[HTTPUserAgentHeader]
[parent = Browserdefinition]
[property1 = value1]
...
[Propertyn = Valuen]

[Default Browser Capability Settings]
[defaultProperty1 = defaultValue1]
...
[Defaultpropertyn = Defaultvaluen]

Parameters
Comments
Any of several lines that begin with a comment;
HTTPUserAgentHeader
HTTP User Agent header, similar to the following format [mozilla/2.0 (compatible; MSIE 3.0;* Windows 95)], where you can use the wildcard character *.
Browserdefinition
The HTTP header used to define the parent class
Propertyn
Property name of the browser, you can select the desired property from the list of properties (see Appendix for a detailed list)
Valuen
The browser's property value
Defaultpropertyn
Default Browser property name, optional properties with Propertyn
Defaultvaluen
Property values for the default browser

Example
;; IE 4.0
[IE 4.0]
Browser=ie
version=4.0
Frames=true
Tables=true
Cookies=true
Backgroundsounds=true
Vbscript=true
Javascript=true
Javaapplets=true
Activexcontrols=true
Beta=false

;; IE 4.01
[Mozilla/2.0 (compatible; MSIE 4.01*; Windows 95)]
Parent=ie 4.0
version=4.01
Minorver=01
Platform=win95

; Default Browser
[Default Browser Capability Settings]
Browser=default
Frames=false
Tables=true
Cookies=false
Backgroundsounds=false
Vbscript=false
Javascript=false

Appendix-List of browser properties
Property name Description
ACTIVEXCONTROLS Specifies whether the browser supports ActiveX controls
BACKGROUNDSOUNDS Specifies whether the browser supports background music
BETA Specifies whether the browser is a beta version
browser specifies the name of the browser
CDF Specifies whether the browser supports channel interpretation definitions for Web publishing (Channel definition Format)
Cookies Specify whether the browser supports cookies
frames Specifies whether the browser supports frame display
JAVAAPPLETS Specifies whether the browser supports Java applets
JavaScript Specifies whether the browser supports JavaScript
platform specifies the operating system required for the browser to run
Tables Specify whether the browser supports tables
VBScript Specifies whether the browser supports VBScript
version specifies the browser versions
Note: The above explanation is "Specify whether browser supports" property whose property value should be true/false and the remainder as String



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.