1 <?xml version="1.0" encoding="utf-8"?>
3 Browser data from http://www.seehowitruns.org/
5 The purpose of this file is to describe, in the shortest possible way,
6 the browsers that have support for JavaScript. Since it is not
7 possible to determine in 100% if a visiting browser has support for
8 JavaScript we are left with our best guess based on the User-Agent
9 header contents. Note that the header may, of course, be faked and
10 completely bogus - thus we do not have to go out of our way in order
11 to be 100% correct and accurate.
12 The important thing to remember about this file before adding any
13 entries to it is that it serves the purpose of finding BROWSERS that
14 DO support JavaScript and not blocking bots etc. that do NOT support
16 The file should be kept as short as possible, because that way the
17 matching we need to do at the beginning of every request will be fast
18 (the entries contained below define 99% of the cases and the generated
19 code is able to match nearly 90000 lines of unique browser strings in
24 1. Two tags are supported: group and except
28 The tag takes several attributes:
31 Specifies a section of the User-Agent string which should be
32 probed for match. Syntax:
36 where both X and Y are digits. Positions are _zero based_
37 (i.e. the first character of the User-Agent string is at position
38 0). Several position ranges can be specified, they must be
39 separated with a comma.
40 Generated code checks the U-A string only at the specified
44 Specifies an index in the User-Agent string from which the code
45 should scan for the value specified in the 'match' attribute.
46 Generated code scans the U-A string from this position, moving one
47 position ahead with each iteration and trying to match the
48 specified value starting from each position.
50 NOTE: 'positions' and 'scanfrom' cannot be specified together and one
51 of them must be specified in order for the compiler to process the
55 Specifies the number of initial positions to skip when 'scanfrom'
56 is used. It is a bit superfluous, as it would be possible to
57 specify 'scanfrom' taking the offset into account, but the idea is
58 that the definition editor can see the whole context when given
59 the "absolute start" and the offset while looking at the agent
63 Specifies the string to look for in the U-A header. Used with both
64 'scanfrom' and 'positions' attributes. The difference is that with
65 'positions' match *MUST* contain the same number of of parts as
66 the 'position' attribute (also separated by commas). Also in the
67 'positions' case, match parts must be equal in length to the
68 specified 'positions' ranges.
69 This attribute is always required.
72 Specifies the default return value of the group. Defaults to
76 Defines an exception to the default return value of the group it is
77 defined in. The attributes are the same what in the 'group' tag
78 above. When a match is made on the 'except' clause, the return value
79 is reverse to the group default.
80 Exceptions are rendered _before_ the subgroups.
83 The 'group' container tags can be nested to any depth and can
84 also contain the 'except' tags.
85 The 'except' tags can be specified only within a group.
86 Unknown tags are silently ignored.
90 <group positions="0-3" match="Mozi">
91 <!-- Mozilla and compatibles -->
92 <group positions="7-10" match="/4.0" javascript="true">
93 <!-- MSIE, Netscape 4.0, Opera -->
94 <except positions="13-28" match="ActiveTouristBot"/>
97 <group scanfrom="12" skip="4" match=") Gecko/" javascript="true">
98 <!-- All the Gecko-based browsers -->
101 <group scanfrom="12" skip="4" match=") Opera" javascript="true">
105 <group positions="12-15" match="(Mac" javascript="true">
109 <group scanfrom="12" skip="2" match="(KHTML" javascript="true">
113 <group positions="12-15" match="Gale" javascript="true">
114 <!-- Galeon < 2.0 -->
117 <group positions="25-28" match="Konq" javascript="true">
121 <group positions="9-11,12" match="/4.,[" javascript="true">
122 <!-- Netscape 4.x -->
126 <group positions="0-3" match="Konq" javascript="true">
130 <group positions="0-3" match="Oper" javascript="true">