web.addAutoFilter

Sets criteria to include or exclude urls when downloading (applies to all subsequent action functions)

Syntax

web.addAutoFilter( {object} );

JavaScript Object

{  
   action:"<string>",
   url:"<string>",
   urlPrefix:"<string>",
   host:"<string>",
   hostPrefix:"<string>",
   hostSuffix:"<string>",
   path:"<string>",
   pathPrefix:"<string>",
   pathSuffix:"<string>",
   port:"<string>",
   scheme:"<string>",
   query:"<string>",
   queryPrefix:"<string>",
   querySuffix:"<string>",
   fragmentId:"<string>",
   fragmentIdPrefix:"<string>",
   fragmentIdSuffix:"<string>",
   id: "<string>"
}
Property Name
Description
action
A value indicating whether to include or exclude URLs matching the filter criteria. The following values are supported.
– Include: include only URLs which match the criteria
– Exclude: exclude URLss that match criteria. (default)
urlThe specific URL to filter
urlPrefixFilter all URLs that begin with this string. For example,
"urlPrefix = http://www.cc"
filters http://www.ccn.com, http://www.cc.edu, http://cc–nanochem.de, and any other URL that begins with "http://www.cc"
hostURLs which include host in the hostname portion of the URL path are filtered
hostPrefixURLs which include this prefix in the hostname portion of the URL path are filtered
hostSuffixURLs which include this suffix in the host name portion of the URL path are filtered
pathURLs with the specified path are filtered
pathPrefixURLs with the specified path prefix are filtered
pathSuffixURLs with the specified path suffix are filtered
portURLs from the specified port are filtered
schemeURLs with the specified communications scheme are filtered. Example schemes are http, https, and ftp
queryURLs with the specified query are filtered
queryPrefixURLs with the specified query prefix are filtered
querySuffixURLs with the specified query suffix are filtered
fragmentIdURLs containing a matching Fragment ID are filtered
fragmentIdPrefixURLs containing a matching Fragment ID prefix are filtered
fragmentIdSuffixURLs containing a matching Fragment ID suffix are filtered
idAn identifier for use by web.removeAutoFilter.

Return Values

Not applicable

Parameterization

All attributes from the list of attributes can be parameterized using standard parameterization.

General Information

web.addAutoFilter specifies a filter to be used when downloading content for ensuing action functions. The filter is disabled when web.removeAutoFilter is invoked. Depending on the action attribute passed in this function, the filter will either include or exclude urls containing the matching criteria. The default action is "action=Exclude".

If the port attribute is set, then only content whose source is that port is downloaded. If no port is specified, then all ports are considered a match.

Example

web.addAutoFilter({action:'Exclude', pathPrefix:'/Images/Upload', id:"fid"})