internetstandards / Internet.nl

Internet standards compliance test suite
https://internet.nl
166 stars 36 forks source link

Add Vary / Content-Language / Content-Location headers #1312

Open bwbroersma opened 4 months ago

bwbroersma commented 4 months ago

A Vary: Accept-Language should be added if the url returns different content based on the Accept-Language by the User-Agent. Since there is no Cache-Control: private, a result could be cached by some TLS terminating proxy server. See Server-driven content negotiation - MDN.

Another thing would be to include more headers:

Content-Location: [en|nl].$url
Content-Language: [en|nl]

Both would steer search engines in better direction to actually link to the correct URL. It could now happen that a search engine returns an English text, and the users clicks and gets the Dutch text, and the reverse. Although the reality is that the apex defaults to English, so internet.nl is seen by search engines as en.internet.nl.

This could be (almost) pure nginx.