Raise your hands if you’ve ever coded a web application that did any of the following:
- Supported more than one language, and automatically chose the language to present based on the contents of the
Accept‑LanguageHTTP header. - Generated different response formats (e.g. JSON vs XML) to REST queries based on the contents of the
AcceptHTTP header. - Supported a “desktop” and “mobile” version of your user interface, and returned different content to the user based on examining the
User‑AgentHTTP header. (Automatically redirecting mobile browsers to a different URL counts, too.) - Attempted to reduce your site’s bandwidth by enabling “gzip” compression for browsers that support it.
I see a reasonable number of hands. Now, how many of you designed your application to tell caches and proxies that you were doing this? Far fewer hands, I see. Those of you with your hands still up can wander off to the buffet while the rest of us discuss the Vary HTTP header.