13 messages in ru.sysoev.nginxRe: Content negotiation?
FromSent OnAttachments
Nuno MagalhãesJul 26, 2009 1:08 pm 
Igor SysoevJul 26, 2009 11:19 pm 
Nuno MagalhãesJul 27, 2009 4:39 am 
Nuno MagalhãesJul 27, 2009 5:25 am 
Jeff WaughJul 27, 2009 5:17 pm 
climborJul 27, 2009 7:20 pm 
Igor SysoevJul 28, 2009 12:01 am 
Jeff WaughJul 28, 2009 12:37 am 
Nuno MagalhãesJul 28, 2009 6:10 am 
Juan Fco. GiordanaJul 29, 2009 1:15 am 
Maxim DouninJul 29, 2009 4:01 am 
Nuno MagalhãesJul 29, 2009 6:47 am 
Marcus ClyneJul 29, 2009 7:47 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Content negotiation?Actions...
From:Jeff Waugh (je@robotparade.com.au)
Date:Jul 28, 2009 12:37:33 am
List:ru.sysoev.nginx

<quote who="Igor Sysoev">

One very simple but useful form of content negotiation is the ability to supply files according to the preferred mime types. For instance:

http://www.example.com/images/logo -> server provides logo.gif or logo.png depending on what the browser provides in the Accepts header.

I'm not sure that using content negotiation for images is good thing: all modern browsers understand basic mime types, and these images must be uncachable on transit proxies.

Not if you add a "Vary: Accept" header. Keep in mind that the MIME type is provided by the server based on the image it chose to serve, negotiated based on what the client claims to support/prefer. It's not a MIME issue.

Then there's conneg for all kinds of other things like languages, but this might be a good first step for nginx.

The question is how many people set (or have by default) right language in browsers ?

Not sure, but some sites do use it as part of their language selection criteria (in addition to geoip and manual selection).

- Jeff

m. +61 423 989 818 b. http://bethesignal.org/ p. +61 2 9043 2940