On the Advanced tab for Real Browser checks we’ll find a setting labeled Exclude Files. We can use this feature to control what resources the Rigor check will load on a page.
There are two main reasons we may want to exclude files:
- To prevent Rigor checks from skewing analytics, or
- To test the performance of a page with or without specific resources loading
Users may also take advantage of the Exclude Files feature to prevent specific third party services from loading. For example, we may want to prevent a random pop-up from a third party service or exclude files that are known to cause performance problems.
To create exclusions:
- Edit Real Browser Check > Advanced > + Add Excluded File
- From the dropdown menu, select from pre-defined filters for common third-party files, or
use the Custom input field to exclude a specific domain, subdomain, resource, or directory
Sometimes we may find that we want to exclude all files except some specific files from a specific domain:
- Edit Real Browser Check > Advanced > + Add Excluded File
- From the dropdown menu, select ‘All Except’ and specify the domain or subdomain that you’d like to include
Notes:
- We may use multiple exclusions or multiple
All Except
rules, andAll Except
inclusions will always take precedence over excluded files - Order is always ignored unless you are using a combination
All Except
andCustom
exclusions - We may not exclude the top-level domain; if the URL for the excluded file rule matches the starting URL for the check that’s set on the Basic tab, the check will not run or return data
- Exclusions are ignored when we run a test in the Real Browser Check > Edit screen
- We may use multiple wildcards (*) at the beginning and the end of exclusion or
All Except
rules
For example, the following Excluded File settings:
will return these HAR report results:
Transitioning From Legacy Wildcard Exclusions
- Legacy exclusions must be transitioned to properly escaped regular expressions (
rigor.com
becomesrigor\.com
, because.
is a special character) - See this guide for writing regular expressions
- This is a handy web app for checking the formatting of your regular expressions