Understanding Custom Acceleration Profiles
This section is not applicable to Web Content Accelerator Express.
Typically, the built-in Web Content Accelerator acceleration profiles provide good general-purpose optimization for your Web applications. However, there might be times when you need to define custom acceleration profiles in order to provide a more fine-grained control over optimization of specific elements of your Web site or application. For an overview of profiles, see Web Content AcceleratorWeb Content Accelerator Profiles.
The Edit page for a custom acceleration profile includes an additional control referred to as the Acceleration Settings dialog.
This contains controls and rules to handle optimization of different content types within your Web application. It is split into two main parts:
•The top part shows the hierarchical list of rules that are applied to your web content, usually based on URL location or browser type.
•The set of tabs below this represent the properties that apply to the current rule. As you highlight a particular rule, its properties are displayed in the tab set below it.
A default settings rule is provided for each Acceleration Profile that cannot be removed. This allows you to define the default behavior of the profile and configure the fall-back values for each of the property tabs. New rules can be added beneath this to further define optimization behavior and to override the default properties based on a specific URL (click Add URL rule). These newly added rules can be ordered according to priority or desired effect by clicking on the up or down arrows to the right of each rule bar. They can be removed altogether by clicking the delete button to the right.
In the rule properties section of the dialog, each displayed tab contains settings relevant to content that constitutes a typical Web application, such as CSS, JavaScript and images. The first tab, Rule Behavior, contains the general description of this particular rule and governs its overall behavior within the scope of whether to accelerate or exclude the content defined by the rule.
Profile Default Rules
In order to provide compatibility for mobile browsers of limited capability, both the Advanced and Basic profiles include settings to selectively disable some Web Content Accelerator features for these browsers.
Specifically, the following browsers have “image combination”, “stylesheet combination”, and “CSS image inlining” disabled by default:
•IE mobile 7
•Opera mini
•Opera mobile
•Blackberry
Additionally, certain optimizations are disabled for search crawler agents in order to allow cached versions of pages to be generic for all browsers. “Image combination” and “CSS image inlining” is disabled for the following search crawler user agents:
•bingbot
•googlebot
These profile default rules are not visible in the custom rules view of the Web Content Accelerator configuration.
Overriding Default Behavior
Each new URL rule added to the list has its own set of properties that can override the default behavior when a match is made. Each property tab contains an Override checkbox that enables or disables this mechanism for that particular property tab. Should you wish to provide an alternate configuration setting for a particular rule, click the Override checkbox to enable the settings for that tab. By default, all settings are disabled/greyed-out until the override checkbox is selected.
Rule Chaining
The default behavior in any given situation is for each request to pass through the list of URL rules and stop when a match is found. This stop-when-matched behavior can be overridden by selecting the Allow settings for this rule to chain to other rules checkbox within a rule.
If enabled, a matching request will not stop at that rule. Instead it will continue on to find a second rule match. Note, however, that this setting only remains in effect until a further match is found. At that point, if the second matching rule does not also have chaining enabled, the request will not attempt to match any further rules. If you wished to have all rules tested throughout your profile, regardless of how many matches occur, you would need to enable chaining on each of them.
Acceleration Settings
Each group of related optimization settings are shown on a separate tab. These are listed below.
Rule Behavior Tab
Setting |
Description |
Rule Description |
A textual description of the current rule, automatically assembled from the basic rule behavior settings contained in this tab. For example, changes to the URL test string or rule mode will be automatically reflected in the descriptive text in this field. It is possible to override this text with your own description, however no further automatic updates will be made. To reset the description back to the default auto-generated string, click the reset button. |
Rule mode |
Web Content Accelerator can be set to accelerate or exclude all pages and resources identified by this rule. Accelerate mode is the default, and performs the desired optimization defined within the rule properties on a matching request. The alternative is to set the rule to exclude optimization for pages or resources that match the supplied URL test. A third mode, strip, strips out resource references where a match is encountered. |
URL test |
These rules only apply to requests that match the specified text. The text is compared with the full URL including the hostname if the Match external resources box is checked, otherwise it is compared only with the URL path. You can specify a substring that must be contained in the URL, or a wildcard or regular expression that must match the entire URL. Before using regular expressions, read and understand the security considerations in Using Regular Expressions. |
Applies to externally hosted resources |
This setting allows you match against resources held external to the Web application. If enabled, the rule will only match requests for hosts that are not included in the Application Scope, and the string contained in the URL test field will be matched against the hostname and path contained in the request. For example, you may wish to exclude media files on your Web page that are included from an external media hosting Web site. If this is the case, you can select this option and specify a wild-carded string in the URL test field that includes the name of the hosting site in addition to the URL path of the media files you are interested in. |
Rule chaining |
Allow settings for this rule to chain to other rules. Please refer to the Rule Chaining section above for more details. |
CSS Tab
Setting |
Description |
CSS and Stylesheet optimization |
None: Style sheets will remain in their original form wherever they appear. Optimize CSS Content: Style sheet blocks in the page and in external style sheets will have all redundant whitespace and comments removed. …and combine consecutive stylesheets: Style sheets that appear as consecutive references (i.e. without inline style blocks or excluded style sheet links between) will be combined and each combined reference inserted to the location where the first style sheet in a set appears in the document. …and combine all stylesheets: All style sheets will be combined, no matter where they appear in the page. The new combined reference will be inserted at the top of the head section of the document. |
CSS background image optimization |
The maximum allowable size (in bytes) of base64 encoded data to be inlined using data:uri notation or a MHTML reference. Images that exceed this limit will remain as URLs. |
JavaScript Tab
Setting |
Description |
JavaScript optimization |
Enabled: Script files will have all redundant whitespace andcomments removed. Disabled: Script files will remain in their original form. |
Images Tab
Setting |
Description |
Combine images |
Enabled: Images that appear as <img> tags in the HTML are combined using one of the following techniques: CSS image spriting: Images are combined into an image sprite according to the image format. Image streaming: Images are combined into one or more image streams. Disabled: Images that appear as <img> tags in the HTML are not combined. |
Shrink images |
Images are shrunk where possible, removing unnecessary information such as metadata, redundant color information and in the case of JPEG images, reducing the quality to reduce the size of the files. If an image appears on a Web page in BMP format, the Traffic Manager automatically converts it to JPEG format to reduce its size. You can prevent this by using a rule to exclude the image from being processed. |
Resample quality |
The percentage quality level to resample lossy images to (0-100). If retaining the quality of your images is paramount, set this value to 100. The default is 85. |
Convert images |
Allow images to be optimized to a different format than the original. The format can be chosen explicitly, or set to "Optimal", which chooses the best format automatically for each image. |
Resize images |
Resize images to a specified width and height in pixels. |
Caching Tab
Setting |
Description |
Honor resource Cache-Control header |
Auto: Web Content Accelerator determines whether to cache a resource based on its content type. Static resources, such as style sheets and images are always cached, whereas dynamic resources, such as JSON-formatted API responses, obey the response's “Cache-Control” directives. Always: Web Content Accelerator obeys all “Cache-Control” directives in the response. Never: Web Content Accelerator caches all content it optimizes. |
Version resource URLs |
Enabled: URLs at this location are versioned by rewriting the URL to contain a hash of the contents of the file. The cache expiry time for versioned URLs is 1 year. Disabled: URLs are unaltered and clients cache the item for the full Cache on browser interval before rechecking. For more information, see Resource Naming and URL Versioning. |
Mark resources as cacheable by intermediary proxies |
Enabled: Resources that are cacheable at this location will be marked with the “Cache-Control” public header that allows them to be cached by intermediary proxy servers. Disabled: Resources that are cacheable will be marked with the “Cache-Control” private header to prevent them from being cached by intermediary proxy servers. |
Optimize resources requested directly by their original URL and store them in the cache |
Enabled: If a resource such as an image or CSS stylesheet is requested by its original URL, enabling this option will cause Web Content Accelerator to optimize and cache the resource before returning it to the client. This can be useful if, for example, your site contains JavaScript that fetches images or other resources from your server after the page has loaded. Disabled: Directly requested resources are returned un-optimized and will not be cached by the Traffic Manager. |
Cache on browser |
The duration, in seconds, resources will be cached on the client’s browser before expiring. This is used as a sliding expiry to set the Expires header, meaning the client will cache the file for the specified number of seconds from when it receives it. This setting applies only to resources that are optimized and requested by their original URL. This excludes combined resource sets or resources utilizing URL auto versioning. In these cases the URL of the resource (or resource set) is generated from a hash of the contents, so modifying the Expires header has the effect of altering the resource URL. This means that the resource would have to be re-requested on the strength of the changed URL. |
Background recheck |
The time, in seconds, after which a resource that is in the server cache will be marked for a recheck. When a resource that is marked this way is requested, the existing version in cache will be returned immediately, while a background task refreshes the cached version if it has been modified. |
Hostname Rewrite Tab
Setting |
Description |
URL hostname rewriting |
Relocates resources from the current domain onto the specified host or URL root by rewriting all matching URLs. This can be specified as a single hostname (for example, cdn.example.com) or a full root URL with optional scheme and path components (for example, “https://cdn.example.com/images”). |