Using the Filter form

 

The Filter form is used to create a new and modify filters.

 

image\newfilt_shg.gif

 

Property:

Select the property that this filter is for. If the Match cond is true, it will be this property which has a new value assigned.

 

Match cond:

Specify the search string to use for checking the visiting browser’s user agent. If this string is found, the value specified in the Value to set field will be assigned to the property chosen in the Property field. This search string should contain one or more wildcard characters.

 

Value to set:

Specify the value that you wish to assign to the property selected in the Property field if the Match cond is found in the visiting browser’s user agent. This value must be valid for the data type of the property, shown in parenthesis in the form underneath this field.

 

Note: If the Property selected is of type Boolean, the Value to set field will only accept values of True or False.

 

Priority:

In the event that multiple filters are defined for the same property (fairly common), this value controls which filter takes precedence if more than one defined filters is matched for a given property. The lower the number, the higher the priority, with 1 being the highest priority.

 

For example, consider the following user agent:

 Mozilla/4.01 [en] (WinNT; I) via proxy libwww Solaris server

 

If you examine the filters defined in maindefs.bdf, you will see two filters for the OSDetails property relevant to this example. One searches for "WinNT", the other for "Solaris". In this case, both are present in our example user agent. The user agent is specifying that the user is on a Windows NT system, but connecting through a proxy server running under the Solaris operating system. In this case, the real OSDetails we are interested in is Windows NT. By setting the Solaris filter to a lower priority (2 in this case), the filter based on WinNT takes precedence, and therefore the OSDetails property is set to "WinNT".

 

See Also:

Filter example

Working with filters

Understanding filters

Testing browser definitions