Quick tip:
You can enter page URLs to exclude them from caching in your website’s Hosting Services in Tools.
Why exclude URLs from caching?
Caching improves the page loading speed and performance by storing page content for faster retrieval during subsequent requests. Excluding pages with sensitive or user-specific content from the cache is essential for preventing user data exposure, and ensuring that dynamic pages display correctly.
Which pages should be excluded from caching?
Certain types of ecommerce pages should always be excluded from caching:
- Shopping cart
- Checkout
- User account
Note:
The 10Web Cache automatically excludes some dynamic pages from caching, such as shopping cart and checkout pages.
Other types of pages should also be excluded, including any pages that contain:
- Data or content belonging to a specific user,
- Product pricing that changes dynamically,
- Forms
In general, if users must log in to use a page, its content should be completely dynamic, not served from the cache.
Excluding a page from caching
- Log in to your 10Web dashboard.
- Click Manage on the site where you’d like to exclude pages from caching.
- Click Tools, under Hosting Services.
- Go to the Exclude specific URLs from server-side caching field in the Website Caching section.
- Paste or enter the complete URL of the page to be excluded, then hit Enter on your keyboard
- Repeat step 5 to exclude additional URLs
- Click Save when finished
Note:
Regular expressions are supported. You can use regex to exclude a page or multiple pages.
To remove an exclusion URL, click on the X next to it. To remove a regex delete the regex sequence. Remember to click Save after adding or removing URLs to save the changes.
Using regular expressions (regex) to define exclusions
Regular expressions can be used to specify a single page or a group of pages to be excluded from caching. The video above shows a regex sequence that activates case insensitivity and matches anything that starts with /contact us/. To have a better understanding of how the regex sequences work, below is a list of general regex characters and their functions.
General regex characters
^A – Match any string that begins with A
A$ – Match any string that ends with A
AB? – Match A or AB, B is optional
AB* – Match A or AB or ABB or ABBB etc., matching B 0 or more times
AB+ – Match AB or ABB or ABBB etc., matching B 1 or more times
A.B – Match a string that has A, then any character, then B
(?i) – Activates case insensitivity so, for example, /post and /Post match are read as the same
A|B – Match A or B
\D - Match any non digit
\d - Match any digit
\s - Match any whitespace character
[a,b,c] - Match only a,b, or c
[^ a,b,c] - Don’t match a, b, or c
[a-z] - Match characters a through z
[0-9] - Match numbers 0 through 9
* - Match zero or more repetitions
+- Match one or more repetitions
\ – Escape character
.* – Match anything. Wildcard
/ - Specifies the string.
Examples
To exclude all pages starting with a specified word. For example proposes we will use events. The following regex specifies the string and matches all strings that have the word events.
events/*
To exclude all pages ending with a specified word. This will exclude any URL ending with events.
events$