Back to articles

Introduction to the use of Targeted Rules

The targeted rule allows you to apply specific settings or exclude optimizations through its optimization features.

Creating a Targeted Rule in EdgeSpeed: A Complete Guide

Introduction

The targeted rule allows youto apply specific settings or exclude optimizations through its optimization features.

Each rule is based on one or more technical criteria (URL, path, device, etc.) that you can freely combine to create custom targets.

💡 Learn more: EdgeSpeed apps

How a targeted rule works

The targeted rules table lists the various filtering criteria to which optimizations are (or are not) applied. You can target based on:

💡 You can combine multiple criteria to create a very specific target audience.

For each rule, there are two configuration options:

Create a targeted rule step by step

Click the " Add Target " button to open the creation window. You can configure:

💡 You must specify at least one criterion for the rule to be valid.

Available criteria

Query URL

The full URL sent to Fasterize: protocol, domain, path, and parameters.

Example:

https://www.monsite.com/dossier/page.html?parametre=valeur

💡 View the detailed page: Request URL

Query path

The journey always begins with / and doesn't understand the settings.

Examples of regular expressions:

💡 See the detailed page: Query path

Tag URL (HTML)

URLs contained in HTML tags such as:

Example:

The expression /upload/my-slider-1\\.jpg targets all references to this image file, regardless of context.

💡 View the detailed page: Tag URL (HTML)

Device

You can target based on the type of device detected:

💡 See the detailed product page: Device

Client IP address

Filtering is available by IP address in the following format:

💡 See the detailed page: Client IP Address

CSS selector

You can target elements using their CSS selectors:

Example:

.ma-zone img → targets all images within an element with the class my-zone

💡 See the detailed page: CSS Selector

Conclusion

Targeted rules are a key feature in EdgeSpeed that allow you to fine-tune your optimizations with precision. By combining criteria andexcluding specific targets, you maintain full control over the optimizations applied to your site.