Last Mile Acceleration

Last Mile Acceleration (LMA) compresses content before delivery to the end user when the requesting browser or device (client) supports gzip decompression. This can provide significant improvement in transfer times to clients with slow connections.

How it works

Your property reviews the request header in a client request for the Accept-Encoding: gzip entry. If it's included, this indicates that the requesting client can decompress gzip content. The property then reviews what's set as Compression Response to determine how to deliver content to the client.

Features and options

FieldWhat it doesOptions
Compress ResponseSelect whether to compress responses to clients that support gzip. Eligible clients include the Accept-Encoding: gzip header in their requests.
  • Always. Your property compresses content at the edge, in an effort to reduce delivery time. The client then decompresses it locally.
  • Never. Content is never compressed. The Accept-Encoding: gzip header is ignored.
  • Same as origin response. Select this to have your property look to your origin server to see if it supports gzip compression, to determine if LMA compression should be used. For example, If you’d like some of your delivered content compressed, and other content decompressed, you can set up your origin server to deliver the Accept-Encoding: gzip, per object.


The Same as origin response option always uses what you have set for Supports Gzip Compression in the Origin Server behavior.

What you can compress

860 bytes is the smallest object that Akamai edge servers will gzip compress and serve to the client. Any smaller than this, and the overhead required to compress and decompress the content eliminates any advantage gained by compression. Keep this in mind when adding LMA to your property. Ideally, you should add LMA to compress objects that are greater than 4.2 KB in size, and are these file types:

  • text/html*
  • application/x-javascript*
  • text/css*
  • application/javascript*
  • text/javascript*
  • text/plain*
  • text/xml*
  • application/json*
  • application/*
  • application/x-font-opentype*
  • application/x-font-truetype*
  • application/x-font-ttf*
  • application/xml*
  • font/eot*
  • font/opentype*
  • font/otf*
  • image/svg+xml*
  • image/*

Add the Minimize payload rule

If your file content falls within the list above, you can quickly add a separate rule that presets the Content Type match criteria to include all of these file types as well as several others that are supported for compression. It includes the Last Mile Acceleration (Gzip Compression) behavior and sets Compress Response to Always.

  1. In Property Configuration Settings, click Add Rule.

  2. Set Available Rules (by Category) to All.

  3. In Search available rules, type minimize and select the Minimize payload rule.

  4. Click the Compressible objects rule entry to see the added rule and its match criteria.

  5. Click Insert Rule to add it to your property.


This rule is default added in a property configuration for ​Akamai​’s Ion product.

What you can’t compress

Don’t use LMA compression for any of these files types:

  • Small files. This includes anything smaller than 860 bytes in size, regardless of file type.

  • Content that is already compressed. This includes Gzip, .zip, .7z, etc. The system attempts to compress this content, even though it’s already compressed, and it won’t decrease its size. This will just delay the delivery of the content.

  • PDFs. If LMA tries to compress a PDF, an error is thrown.

  • Image files. We recommend against this, even if you think they’ll compress. If you're working with JPEG images, consider using Image & Video Manager. It intelligently and automatically optimizes images and videos on the fly for every user. Reach out to your ​Akamai​ representatives for more information on this product.

  • Chunked content. This includes any content that's delivered as content-encoding: chunked. If your property includes the Chunked Transfer Encoding behavior, you need to ensure that any rule's Criteria that contains the LMA behavior excludes any file formats that may be chunked. To be sure that you're safeand you're only including LMA-supported file formatsapply LMA by including the Minimize payload rule.

  • Streaming media content. Often, this content is compressed for delivery using other means. It won’t benefit from LMA compression.

LMA and Adaptive Media Delivery

Streaming media assets such as manifest files and closed captioning files for HLS and DASH format media can fall into the “text/” related compression categories. Compression of these files can result in poor performance or break stream delivery. To accommodate this, best practices settings are automatically applied in the background for Adaptive Media Delivery properties that include LMA compression for other file types.

For best results, don't include this behavior in your Adaptive Media Delivery properties because it’s not intended for use with streaming media content.

Purge existing content after you enable LMA

If you add LMA to an existing property that's already delivering content, you should purge any cached content before you go live to production with the updated property. If you don't, you won't see the benefit of the compression. Your property may continue to deliver larger, uncompressed content from cache, impacting delivery time.


With LMA enabled and after you perform this purge, there may be a noticeable increase in traffic to your origin until edge server caches have been refreshed with compressed content.