Accept-Encoding: Which compression algorithms the client supports for the response body. Accept-Encoding tells the server which compression methods the client understands, such as gzip, br for Brotli, or zstd. The server compresses the response with one of them and says which in the Content-Encoding header. Compression makes a large difference for text. HTML, CSS, JavaScript and JSON often shrink to a fifth or less of their original size. That means faster pages, especially on mobile connections, and lower bandwidth costs.
What should you keep in mind with Accept-Encoding?
Browsers send this header automatically, so the work is on the server side. Make sure your web server or CDN compresses text responses, and consider precompressing static files with Brotli at build time, so the server does not compress the same file on every request. Images such as JPEG and WebP are already compressed, so compressing them again only wastes processor time.
What does an example of Accept-Encoding look like?
Use when reviewing or setting HTTP response headers for a web app or API - security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy), CORS headers, caching headers (Cache-Control, ETag, Last-Modified, Vary) and cookies (Set-Cookie flags). Also use when a security scan reports missing headers.
'Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.'
OWASP Top 10 security audit and secure coding guidelines for Laravel + React/Inertia.js applications. Use when auditing for vulnerabilities ("run OWASP audit", "security review", "check my app security") or writing secure Laravel code involving auth, payments, file uploads, or API design. Triggers on security-related tasks, payment handling, authentication, or any request to audit a Laravel codeba