Welcome! Log In Create A New Profile

Advanced

Re: Content negotiation?

Jeff Waugh
July 28, 2009 03:37AM
<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

--
Robot Parade http://www.robotparade.com.au/

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

Content negotiation?

Nuno Magalhães July 26, 2009 04:08PM

Re: Content negotiation?

Igor Sysoev July 27, 2009 02:19AM

Re: Content negotiation?

Nuno Magalhães July 27, 2009 07:39AM

Re: Content negotiation?

Nuno Magalhães July 27, 2009 08:25AM

Re: Content negotiation?

Jeff Waugh July 27, 2009 08:17PM

Re: Content negotiation?

Igor Sysoev July 28, 2009 03:02AM

Re: Content negotiation?

Jeff Waugh July 28, 2009 03:37AM

Re: Content negotiation?

Nuno Magalhães July 28, 2009 09:10AM

Re: Content negotiation?

Juan Fco. Giordana July 29, 2009 04:16AM

Re: Content negotiation?

Maxim Dounin July 29, 2009 07:02AM

Re: Content negotiation?

Nuno Magalhães July 29, 2009 09:48AM

Re: Content negotiation?

Marcus Clyne July 29, 2009 10:47AM

Re: Content negotiation?

climbor July 27, 2009 10:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 110
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready