EDGE automatically uses Brotli compression (and Gzip as fallback) to compress content before sending it to browsers, significantly reducing file sizes and improving page load times.

Understanding Compression

What is Compression?

Compression reduces file size by:

  • Removing Redundancy: Eliminates redundant data
  • Efficient Encoding: Uses efficient encoding methods
  • Smaller Files: Results in smaller file sizes
  • Faster Transfer: Smaller files transfer faster

Compression Benefits

  • Smaller File Sizes: Compression can reduce bandwidth requirements by up to 70%, depending on the type and compressibility of the content.
  • Faster Loading: Smaller files load faster
  • Reduced Bandwidth: Less bandwidth usage
  • Better Performance: Improved page load times

Brotli vs. Gzip

Brotli Compression

Advantages:

  • Better Compression: 15-20% better than Gzip
  • Modern Algorithm: Latest compression technology
  • Good Browser Support: Supported by modern browsers
  • Automatic: EDGE uses automatically

Browser Support:

Brotli is supported by all major modern browsers. EDGE uses Gzip when Brotli is not supported.

Gzip Compression

Advantages:

  • Universal Support: Supported by all browsers
  • Fallback: Used when Brotli not supported
  • Reliable: Well-established compression

Use Case:

  • Fallback for older browsers
  • Universal compatibility

How EDGE Uses Compression

Automatic Compression

EDGE automatically compresses content:

  1. Content Request: Browser requests content
  2. Browser Detection: EDGE detects browser capabilities
  3. Compression Selection: Best compression selected (Brotli > Gzip)
  4. Content Compressed: Content compressed before sending
  5. Content Served: Compressed content served to browser

Managed compression

EDGE manages the compression method and settings automatically. When a browser supports Brotli, EDGE can serve eligible content using Brotli. Otherwise, it can use Gzip as a fallback.

You do not need to select a compression algorithm or tune a compression level.

What Gets Compressed

EDGE compresses:

  • HTML: HTML pages compressed
  • CSS: CSS files compressed
  • JavaScript: JavaScript files compressed
  • Text Files: Other text-based files
  • Not Compressed: Already compressed files (images, videos)

Compression Configuration

Automatic Configuration

EDGE configures compression automatically:

  • No Manual Setup: Works automatically
  • Optimal Settings: Optimized for WordPress
  • Browser Detection: Automatically detects browser support
  • Fallback: Falls back to Gzip if Brotli not supported

Compression Benefits

File Size Reduction

Typical reductions depend on the content being compressed. In internal examples using common web assets, compression reduced file sizes by 65–85%, including:

  • HTML: typically significant reductions depending on page content
  • CSS: around 85% for highly compressible stylesheets
  • JavaScript: approximately 65–70% for common libraries

Actual results vary according to the content, level of minification, and amount of repeated text.

Performance Benefits

  • Faster Page Loads: Smaller files load faster
  • Reduced Bandwidth: Less bandwidth usage
  • Better User Experience: Faster sites
  • Improved SEO: Faster sites rank better

Verifying Compression

Check Compression in Browser

1. Browser Developer Tools

  • Open browser developer tools (F12)
  • Go to Network tab
  • Reload page
  • Check response headers

2. Check Headers

For a Brotli-compressed response, the response headers show Content-Encoding: br. If Gzip is used, they show Content-Encoding: gzip. If neither header appears, the selected response may not be compressed.

3. Check File Sizes

In the browser’s Network panel, select an HTML, CSS, or JavaScript request and compare the transferred size with the resource size. The transferred size should normally be smaller when compression is applied. Also confirm that the response includes Content-Encoding: br or Content-Encoding: gzip.

Testing Compression

1. Check Response Headers: Verify compression headers
2. Compare File Sizes: Compare original vs. compressed
3. Test Performance: Check performance improvements
4. Verify Browser Support: Test in different browsers

Compression Best Practices

Configuration

  • Use Defaults: EDGE defaults work optimally
  • Trust Automatic Selection: Let EDGE select best compression
  • Monitor Performance: Watch performance metrics
  • No Manual Configuration: No need to configure manually

Content Optimization

  • Optimize Source: Start with optimized source files
  • Use Compression: Let EDGE handle compression
  • Monitor Performance: Watch performance improvements
  • Test Regularly: Test compression performance

Troubleshooting Compression

Issue: Compression Not Working (Content not compressed)

Solutions:

  • Check browser support
  • Verify EDGE is serving content
  • Check response headers
  • Test an HTML, CSS, JavaScript, JSON, XML, or other text-based response rather than an image or video.
  • Confirm that the response includes a compressible Content-Type.
  • Check whether the response is too small to benefit from compression.
  • Confirm that the request is being served through EDGE rather than directly from the origin.
  • Test with a normal GET request and without browser extensions or proxies that may modify headers.
  • Purge the relevant cache and test the response again.
  • If the issue persists, contact Support with the affected URL and the request and response headers.

Issue: Poor Compression Ratio

Symptoms: Files not compressing well
Solutions:

  • Check file types (already compressed files won’t compress more)
  • Verify source files are text-based
  • Check compression is enabled
  • Check whether the file has already been minified or compressed.
  • Remember that compression ratios vary according to the content and amount of repeated text.
  • Test a representative HTML, CSS, or JavaScript response rather than an already compressed format.
  • Confirm that the transferred response actually uses Brotli or Gzip.
  • Compare the transferred size across equivalent uncached requests.
  • If the result appears abnormal, contact Support with the URL, content type, response size, and response headers.

Where to go next