W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2000

Re: Content negotiation for index page

From: Yves Lafon <ylafon@w3.org>
Date: Tue, 28 Mar 2000 10:40:26 +0200 (MET DST)
To: Dennis Sosnoski <dms@sosnoski.com>
cc: www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.21.0003281032440.18554-100000@tarantula.inria.fr>
On Mon, 27 Mar 2000, Dennis Sosnoski wrote:

> I'd like to have different default pages for my site depending on
> whether it's accessed from a cell phone browser (content type
> text/vnd.wap.wml) or a regular web browser. It looks like it should be
> possible to do this, but I haven't been able to figure out how to
> configure it.

Content Negotiation is of course possible, and is very flexible.
In your case you want to have the default page changed depending on .html
or .wml.
Let's suppose they are called Overview.html and Overview.wml (Having the
same basename helps automation, but it is not required).
If the container is declared to be negotiable, a Framed resource with a
NegotiatedFrame [1] called "Overview" will be created. 
If the index of the container is set to be "Overview", then the default
page will be served using content negotiation. (The index of the container
can be modified per resource, or set directly in the indexer).

Also it is possible to do it direcly, just create a resource, ex: "foo", a
FramedResource, and a NegotiatedFrame attached to it, and configure the
variants (ex: Overview.html, Overview.wml and bar.txt), and everytime you
want to reference Overview.html/wml or bar.txt, just reference
"foo" instead. And this "foo" resource can be set as the index or one of
the indexes of a container. 
Hope it is clear ;)

[1]: http://www.w3.org/Jigsaw/Doc/Reference/org.w3c.jigsaw.frames.NegotiatedFrame.html
 
      /\          - Yves Lafon - World Wide Web Consortium - 
  /\ /  \        Architecture Domain - Jigsaw Activity Leader
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
Received on Tuesday, 28 March 2000 03:41:20 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:07 UTC