This is a following to my yesterday question: http://stackoverflow.com/questions/1975416/trying-to-understand-the-vary-http-header
I have a .php that can be served with different MIME types. To do this I use "Vary: Accept" HTTP header (which is confirmed to be correct). But what if the same document (with the same URL) can be served in many languages (and this page can be cached by proxies)? I know this is bad design, but it can happens sometimes. What in that particular case would be the way to do this.
J.J. gave a link ( http://www.w3.org/Protocols/HTTP/Issues/vary-header.html ) to a discussion where someone wanted to use the Vary HTTP header for a document that can be served in two different languages:
For the request/variant scenario you listed a server SHOULD NOT BE USING VARY: Sorry to shout, but I want it to be real clear. Vary: is strictly for those cases where it's hopeless or excessively complicated for a proxy to replicate what the server would do (other than storing header and doing strict request header equality comparisons on subsequent requests).
I think the solution lies in the link provided by J.J., but I'm not sure what is it and how to implement it in PHP.
Thanks for your lights!