Vary for Images: Serve the Correct Images to the Correct Browsers
Cloudflare has announced support for Vary, an HTTP header that allows different content types to be served to user-agents with varying capabilities. This is particularly useful in serving optimized image formats to browsers with differing capabilities. The Vary header enables origins to serve variants of the same content from a single URL and have intermediate caches deliver the correct variant to each user-agent that comes along. By parsing the request's Accept header, Cloudflare ensures that the origin knows exactly what content it needs to deliver to the browser. This feature is currently available for Pro, Business, and Enterprise Customers through the Cloudflare API.
Company
Cloudflare
Date published
Sept. 13, 2021
Author(s)
Alex Krivit
Word count
1396
Hacker News points
4
Language
English