Master HTTP Accept-Encoding Headers
Optimize your website performance with HTTP compression algorithms
Compression Algorithms
Learn about the most popular HTTP compression algorithms and how to implement them.
Gzip Compression
The most widely supported compression algorithm with excellent compatibility.
Learn about gzip →Brotli Compression
Google's modern compression algorithm offering superior compression ratios.
Learn about Brotli →Deflate Compression
The foundation of gzip, offering basic compression capabilities.
Learn about deflate →Zstandard (zstd)
Facebook's real-time compression algorithm with excellent speed.
Learn about zstd →Browser Support & Compatibility
Understand which browsers support which compression algorithms and how to handle edge cases.
Browser Compatibility
Comprehensive browser support information for all compression algorithms.
Check compatibility →Performance Testing
Benchmark and optimize compression for maximum performance.
Optimize performance →Testing Tools
Tools and resources for testing HTTP compression.
Test compression →Server Configuration Guides
Step-by-step tutorials for enabling compression on popular web servers.
Nginx Configuration
Enable gzip and Brotli compression on Nginx servers.
Configure Nginx →Apache Configuration
Configure mod_deflate and mod_brotli for Apache servers.
Configure Apache →IIS Configuration
Set up dynamic and static compression on Windows IIS.
Configure IIS →Install IIS Compression
Add the Dynamic Content Compression feature with PowerShell, Server Manager or DISM.
Install the feature →Brotli on IIS
Install IIS Compression (iisbrotli.dll) and configure the br scheme correctly.
Enable Brotli →Cloudflare Compression
Which content types Cloudflare compresses, and how Brotli and Zstandard are chosen.
Check Cloudflare →Performance Optimization
Advanced techniques for maximizing compression efficiency and website speed.
Performance Optimization
Maximize website speed with optimal compression strategies.
Optimize now →Best Practices
Industry standards and recommendations for HTTP compression.
Learn best practices →Testing & Monitoring
Tools and techniques for testing compression effectiveness.
Test compression →Troubleshooting
Solutions to common HTTP compression problems.
Fix issues →Implementation Guides
Practical tutorials for implementing compression in your applications.
API & Implementation
Code examples for Node.js, Python, Java, PHP, and more.
View code examples →Browser Support
Detailed browser compatibility information.
Check support →Best Practices
Security considerations and optimization tips.
Learn more →Troubleshooting
Debug and fix common compression issues.
Get help →The Protocol Itself
Reference pages on the header and the cache-key plumbing that surrounds it.
Accept-Encoding header
Syntax, q-values, identity, the wildcard, and what servers actually do with each form.
Read the reference →Vary: Accept-Encoding
Cache-key behaviour, the normalisation pitfall, and how to keep CDN hit rates healthy.
Understand caching →CDN edge compression
Cloudflare, Fastly, CloudFront, Akamai — compress at edge or origin?
Compare CDNs →Accept-Encoding values
What gzip, deflate, br, zstd, identity and * mean, and what clients send by default.
Content-Encoding header
The response side: valid values, Content-Length, and Transfer-Encoding compared.
Read the reference →Compressed request bodies
Sending gzip-compressed POST bodies and why APIs answer 400 or 415.
Compress uploads →Decoding errors
ERR_CONTENT_DECODING_FAILED, "failed to decode", truncated Brotli streams — causes and fixes.
Fix decoding errors →Precompression
Shipping .gz and .br alongside your build output, and serving them correctly.
Quick Accept-Encoding Header Reference
Accept-Encoding: gzip, deflate, br
Accept-Encoding: *
Accept-Encoding: gzip;q=1.0, identity;q=0.5, *;q=0
The Accept-Encoding request header indicates which content encodings the client can understand. The server responds with a matching Content-Encoding and a Vary: Accept-Encoding header so caches keep the variants separate.