Configuring HTML Streaming with the Performance & Delivery Rule Builder
This document describes how to use the Performance & Delivery Rules builder to create rules to control HTML Streaming. For general information about the Performance & Delivery Rules screen, see Configuring Performance & Delivery Rules in the Portal. For a detailed description of HTML Streaming, see What is HTML Streaming?
In the rule builder screen, select criteria you want to use to decide to turn HTML Streaming on or off. Then choose HTML Streaming as the action:
If you select On, the following additional fields appear:
These controls give you some control over how HTML Streaming constructs the cache key for the streaming stub cache.
- Drop Query Parameters allows you to remove any query string from the URL for the cache key. This means that, for example, two URLS acme.com/anvils/?itemid=56232123&color=royalblue and acme.com/anvils/?itemid=56232124&color=disgustinggreen, which would usually have their streaming stubs cached as separate objects and would each require its own separate learning period before a cache hit could occur, would instead both be mapped as a single object if Drop Query Parameters is set to True. This reduces the time for the common stub to be learned and therefore the time before subsequent requests for either of those URLS gets a streaming cache hit.
- Limit Cache Key similarly can combine multiple URLs into a single streaming cache stub, this time by specifying the length (or depth) of the URL's path prefix. For example, there might be paths like these:
all of which might use the same set of HTML templates, so that the heads are actually all the same. These could be mapped to fewer cached stubs by cropping the path prefix. For example, if Length is set to 2 for the paths above, they will all use product/current as the cache key specifier.
You can also specify one or more tags that you do not want included in the cached stubs. This is usual because they are potentially changing from request to request Click + to open the fields to specify a tag:
Provide a Name, the tag type (script, link, meta, or any other tag name that is valid inside an HTML head), and a Regex match condition.
In this example, we are specifying that tags of type script that contain the substring "NREUM" within them should be skipped from including in the HTML Streaming stub cache.