Configuring Web Content Accelerator for Your Services

Web Content Accelerator can be enabled as a property of a virtual server, through the Web Content Accelerator link on the Virtual Servers > Edit page of the Admin UI.

It is possible to fully enable or disable Web Content Accelerator functionality for a virtual server using the aptimizer!enabled configuration key in the “Basic Settings” section.

If you are running Web Content Accelerator Express, the UI controls discussed in the remainder of this section are not applicable and should be considered for reference only. Contact your support provider for more information.

A virtual server manages traffic for a specified port and protocol. Requests that it handles might be for a particular application, based upon the URL requested; for example, “http://www.mywebsite.com/supportsystem”. This hostname and path combination can be used to create a connection between the application being requested (through this virtual server) and the optimization profile that should be used when it is identified.

In the Web Content Accelerator “Profiles” section, you can define the mappings between various acceleration Profiles you want to use and the “Scope” within which they should apply. Profiles and Scopes are Catalog objects and must be created before being used on this page. To learn more about each of these concepts, see the sections that follow.

You can define and map several Scopes to a single Profile, depending on your requirements, though a scope can only be used once within a single virtual server.

The Web Content Accelerator Wizard

As with other wizards, the Traffic Manager provides an automated process to enable you to quickly set up Web content optimization on your Web services: the Optimize a web application wizard.

You must have previously created at least one virtual server in order to do this; the wizard cannot run without one. It is recommended that you first follow the Manage a new service wizard in order to create a suitable virtual server upon which to run the wizard.

To run the wizard, select Optimize a web application from the "Wizards" drop-down menu in the navigation bar.

The wizard has three main steps:

1.Select the virtual server upon which you are applying optimization.

2.Select the Application scope.

3.Select the Web Content Accelerator profile to be applied for that scope.

Application Scopes

An Application Scope object is used to define a collection of URLs that match a specific Web site or application hosted by a virtual server. To view, modify, and add new Application Scopes, click Catalogs > Web Content Accelerator Catalogs > Application Scopes catalog.

When a request is received through a virtual server, a match is sought to the most-specific URL within the Scope mappings defined in Virtual Server > Edit > Web Content Accelerator. If the Traffic Manager finds a match, it applies the appropriate optimization Profile defined in the mapping.

Several hostnames can be included in one Scope record. However, all these names should be aliases for the same host, and it should be possible to fetch the same resources using any of them. If an alternate hostname is used to serve content from a Content Delivery Network, then that CDN must proxy the origin host so that content passes through the same Application Scope again within the Traffic Manager.

To match “any” hostname, create a new scope record and leave the hostnames list blank. Alternatively, where multiple applications are hosted through a particular virtual server, differentiated by the URL in the request, set up a new Scope record for each combination of hostname and root path involved.

Resources served through the virtual server will only be considered for optimization if they match both the hostname declared in the attached scope and the port on which the virtual server is running. The hostname match will be performed using the hostname(s) specified in the scope, or using the hostname of the page request if the scope hostname setting is blank. All requests for dependent resources will use the primary hostname (first in the list) if explicitly set.

To optimize resources hosted on a different host, such as an external media host, use a Web Content Accelerator Profile that includes a URL rule with the Applies to externally hosted resources option enabled. For more details, see Acceleration Settings.

Applying an Application Scope that specifies a hostname to a virtual server that does not host an application by that name may cause requests to fail with a 502 status - if you see this HTTP status, check that the Application Scope hostnames are logically grouped by the application they represent.

Ensure that multiple scopes do not provide conflicting URL matches.

When creating a new scope entry, the root configuration key can be utilized to further identify the root path to the application in scope.

A built-in scope is automatically provided, entitled “Any hostname or path”, that can be used where no specific hostname and/or path identification is required within the Web application. The hostname field is blank, and the root field is set to “/” accordingly.

Web Content Accelerator Profiles

The Web Content Accelerator Profiles catalog contains a list of profiles that can be applied to websites and Web applications to enable automatic content optimization. To view, modify, and add new Web Content Accelerator Profiles, click Catalogs > Web Content Accelerator Catalogs > Web Content Accelerator Profiles catalog.

Built-in and Custom Profiles

The Traffic Manager provides a number of “built-in” profiles that provide pre-defined optimization settings for your Web applications. These profiles are not modifiable or deletable, and are designed to offer a choice of optimization settings applicable to most situations. Choose from:

Name

Description

Express

This profile provides basic optimization settings and techniques designed for a wide range of web sites. These techniques include shrinking CSS, inlining CSS background images, minifying javascript, shrinking images, and advanced caching.

SharePoint 2007

This profile provides optimization settings tuned for acceleration and compatibility with Microsoft SharePoint 2007 Internet and intranet sites. It includes resource URL versioning, durable caching, CSS StyleSheet inlining, CSS minification, background image inlining, JavaScript minification, compression, image shrinking and metadata removal, and advanced JavaScript compatibility.

SharePoint 2010

This profile provides optimization settings tuned for acceleration and compatibility with Microsoft SharePoint 2010 Internet and intranet sites. It includes resource URL versioning, durable caching, CSS StyleSheet inlining, CSS minification, background image inlining, JavaScript minification, compression, image shrinking and metadata removal, advanced JavaScript compatibility and SharePoint ribbon optimization.

SharePoint 2013

This profile provides optimization settings tuned for acceleration and compatibility with Microsoft SharePoint 2013 Internet and intranet sites. It includes support for a SharePoint feature called Minimal Download Strategy (MDS). This is designed to reduce the white-screen effect when navigating between pages and to reduce the data transferred.

As your browser navigates from page to page, the HTTP page responses contain only fragments of HTML that differ from the previous page. Without MDS enabled, each page response contains the entire page content. The MDS feature is enabled by default, but it is disabled after the site “look and feel” is customized.

Differences to the SharePoint 2010 profile are:

Web Content Accelerator supports and optimizes MDS fragments.

SharePoint 2013 loads many individual scripts. Web Content Accelerator optimizes this behavior by delivering script content through preconfigured script sets. For example, when SharePoint requests “/_layouts/15/init.js”, Web Content Accelerator delivers a script set containing that and other scripts normally loaded at the same time. When SharePoint needs one of these scripts, it is already in the browser cache as part of the Web Content Accelerator script set and can be used immediately.

SharePoint 2013 Custom Website

The SharePoint 2013 user interface can be heavily customized, and might not use all the default scripts, styles, and images that a default SharePoint 2013 site uses.

This profile is an adapted version of the standard "SharePoint 2013" profile, designed for customized Web sites that do not require the default SharePoint scripts and resource sets to be downloaded by browsers.

For default SharePoint sites, use instead the "SharePoint 2013" profile.

Other Web application

This profile provides basic optimization settings appropriate for safely accelerating most Web applications. It includes CSS StyleSheet inlining, CSS minification, background image inlining, JavaScript minification, compression, and image shrinking and metadata removal. You can use this profile as a template for creating new profiles customized to the optimization requirements of your Web applications.

Basic

(deprecated)

This profile is designed to enable a useful number of basic optimization techniques that work well on a wide range of Web sites. These techniques include shrinking CSS, in-lining CSS background images, “minifying” JavaScript, shrinking images, URL versioning and advanced caching.

Advanced

(deprecated)

This profile enables more advanced optimization techniques in addition to those offered by the Basic profile, including combination of CSS style sheets and combination of HTML images into image sprites. These techniques will dramatically reduce page load time, but may require customized rules for compatibility with some sites. In this case, you would clone the profile in order to create a custom Web Content Accelerator profile (discussed later).

If these profiles cannot offer you the desired level of optimization across all elements of your Web site, you can opt to create a new custom Web Content Accelerator Profile that fulfills your specific requirements.

To create a custom profile, use the "Create a new Web Content Accelerator Profile" section, specifying one of the built-in profiles as a template. Select the desired template profile from the drop-down list and then click Create Web Content Accelerator Profile. Built-in profiles can also be duplicated to create new custom profiles using the Save As option on the Edit Profile page.

Custom profiles provide a range of additional acceleration options. For further information, see Understanding Custom Acceleration Profiles.

Optimization Modes and Page Information

Web Content Accelerator can run in one of three modes, defined using the aptimizer_mode configuration key:

Off: Acceleration is disabled, but requests for Web Content Accelerator resources are served.

Stealth: Acceleration is disabled, except where enabled using the query string command:

?aptimizer=on

On: Acceleration is enabled for all requests.

You can elect to show request information for each Web page that is passed through a Web Content Accelerator Profile using the show_info_bar configuration setting on the Edit Profile page. If this is set to “Yes” and acceleration is currently active, all pages in this session will show a status bar which includes controls to provide information specific for that request.

Background Optimization

Optimizing complex resources, such as large image sets or CSS files with multiple nested imports, can be a time-consuming process. Although Web Content Accelerator will do this only once for a given resource, it might result in the client that first requires this optimized resource having to wait for it to be completed.

This section allows you to configure Web Content Accelerator to complete optimizations in the background, serving the original un-optimized server content to all clients that request it until the optimized data is ready.

Resources, such as combined image sets, will be automatically cached after they are optimized. Web pages will be cached only if the virtual server's webcache!enabled setting is “Yes”. However, if all the resources on the page have already been optimized, the fully optimized page can be delivered quickly.

The Traffic Manager offers two profile settings for determining whether and how to optimize resources in the background:

Setting

Description

background_after

Specifies the number of milliseconds after which the optimization will be put into the background and the original server content will be served to the client.

When set to 0, Web Content Accelerator will always wait for the optimization to complete before sending a response to the client.

Some resources, such as JavaScript files, must always be served optimized. As such, they cannot be optimized in the background using this setting.

background_on_additional_resource

When a page, or a resource such as a CSS document with nested imports, requires Web Content Accelerator to fetch additional resources to complete the optimization process, do the optimization in the background.