Exclusions settingsAccelerator for WordPress

Here can be specified pages’ URLs that should be excluded from processing by both caching as content processing engines.

Note. There are additional user exclusion argument settings that are used independently.

settings-Exclusions

URI paths#

Only matched pages’ URLs will be excluded. It can be added multiple items at once by placing each on new line.

Syntax#

Pages’ URLs beginning these strings in their paths will be matched. You can add parts with or without a / at the beginning.

Regular expressions are also supported with conditions. Current path is always compared without beginning slash. E.g. if you want to match all pages except site’s root then you need to add @^[^/].*@ expression. E.g. to exclude only root: @^\/$@. E.g. to exclude all pages except root and pages that begin with ‘blog’: !@^\/$@ & !@^blog@. Also, for excluding pages numbering, @(?:^|/)page/@ can be used. Any regular expression quote symbols except / can be used.

Note. These strings are always related to site’s root address. E.g. if site URL is https://mysites.com/one and you want to match https://mysites.com/one/subdir, then you need to add only subdir to the list.

URI arguments#

Excluding#

  • Exclude particular

    Pages’ URLs having arguments that begin with any of the specified strings (or matched with regular expressions for whole name and value) will be excluded. It can be added multiple items at once by placing each on new line.

  • Exclude all

    If checked, all pages’ URLs having any arguments will be excluded except defined in ‘Skip particular‘ mode or if ‘Skip all‘ is nor set.

Skipping#

  • Don’t skip anything

    No any skipping will be performed.

  • Skip particular

    Pages’ URLs having arguments that begin with any of the specified strings (or matched with regular expressions for whole name and value) except defined in ‘Exclude particular‘ mode will be treated as without these arguments and cached as the same items. E.g. if a1 is specified then https://mysite.com/page1?a1=1&a2=2 will be processed as https://mysite.com/page1?a2=2. It increases pages’ response speed when they are, for instance, opened from external sources appended by tracking arguments like Facebook’s fbclid. It can be added multiple items at once by placing each on new line.

  • Skip all

    If checked, all pages’ URLs having any arguments will be treated as without arguments except defined in ‘Exclude particular‘ mode and cached as the same items. E.g. https://mysite.com/page1?a1=1&a2=2 will be processed as https://mysite.com/page1. This mode overrides ‘Exclude all‘ mode.

Examples#

Excluding specified and skip all others#

  • Set ‘Exclude particular‘ mode.
    • Set needed arguments in ‘Exclude particular‘s list.
  • Set ‘Skip particular‘ mode.
    • Add @.+@ to ‘Skip particular‘s list.
  • Or set ‘Skip all‘ mode.

Skipping specified and exclude all others#

  • Set ‘Exclude all‘ mode.
  • Set ‘Skip particular‘ mode.
    • Add needed to ‘Skip particular‘s list.

Agents#

Pages’ requests having these strings in their user-agents will be excluded. It can be added multiple strings at once via separating by commas.

Note. All strings are compared with insensitive case.

Cookies#

Pages’ requests having cookie names that begin with any of the specified strings will be excluded. It can be added multiple names at once via separating by commas.

Content’s patterns#

Here you can specify parts of the pages via their patterns (XPaths). If any of elements is matched with specified patterns on the page it will be excluded from caching. Since XPath language it is an analogue of CSS, it allows you to make settings both for individual pages and for their set, using the principle of CSS selectors (classes, tags, properties, …). It can be added multiple patterns at once by placing each on new line.

E.g. this expression finds only empty element (without children) with class some-class:

.//*[contains(concat(" ",normalize-space(@class)," ")," some-class ")][count(./*)=0]

Note. These exclusions are checked while optimization process instead of other exclusions that checked immediately while accessing pages. So, all excluded pages can be seen in optimization queue.

Leave a Reply