[Zope3-dev] Relative links

Shane Hathaway shane@zope.com
Wed, 27 Mar 2002 10:10:25 -0500


Casey Duncan wrote:
> That is what apache currently does, no? Isn't there even some 
> optimization that browsers have to handle this case?
> 
> I know this was discussed at one of the earlier sprints? Why is it we 
> aren't doing that again (aside from the smell)?

This is an old browser problem.  You want relative links to work, but 
you want to be able to access a page more than one way (with or without 
a trailing slash, for example).

Apache's solution is to redirect when you address a directory without a 
trailing slash.  It works pretty well and this is probably what W3C 
would recommend.

Zope's solution is to add a base tag.  It works pretty well also.

I wish it were reliable to encode the BASE tag in the HTTP headers, as 
Chris suggested, which would be the best solution.

> Chris McDonough wrote:
>> If the browser manufacturers implemented HTTP/1.1 Content-Location and/or
>> Content-Base properly, it would not be necessary.  See
>> http://lists.zope.org/pipermail/zope-coders/2001-November/000460.html . I
>> believe the only other option with the current state of affairs is
>> redirection to "container/" when you visit a containerish object.

Shane