HTTP 302 redirect optimization

302 redirect optimization minimizes the number of 302 redirect responses, which allows your application to load balance more effectively.

If a main manifest request is redirected, and 302 optimization is enabled in your player, subsequent requests made for assets from that manifest will use the final domain location, which avoids additional 302 responses.

This feature is disabled by default, and you can change this setting.

If you enable this feature, it works correctly only if all of the following conditions are true; otherwise, no redirect optimization occurs, and 302 responses continue to occur:

  • Your application was compiled for Adobe Flash Player 11.8, using -swf-version 21 or higher.
  • Your end users have Adobe Flash Player 11.8 or later installed.

To ensure that cookies are passed with ad requests, disable 302 redirect. When 302 redirect is enabled, the ad request might be redirected to a domain that is different from the domain from which the cookie originated.

Disable or enable 302 redirect optimization

Use the useRedirectedUrl property to turn 302 redirect on (true) or off (false).

For example:

// Set useRedirectedUrl property to true
var networkConfiguration = new NetworkConfiguration();
networkConfiguration.useRedirectedUrl = true;

//Set NetworkConfiguration as Metadata:
var result:Metadata = new Metadata();

var mediaResource = new MediaResource( url, MediaResourceType.HLS, result);

// load the resource
mediaPlayer.replaceCurrentResource( mediaResource, mediaPlayerItemConfig );

On this page