[Zope] base in head
Martijn Pieters
mj@digicool.com
Fri, 10 Mar 2000 15:47:26 +0100
From: "Sin Hang Kin" <iekentsin@infoez.com.mo>
> how to prevent zope from putting the base tag into the head?
Why do you want to do this? Have you thought of why it is there?
Create a folder 'Foo' with an index_html method in that Folder, and a 'bar'
method. The index_html document contains a relative link to bar
(href="bar"). Next, go to the URL:
http://your.server.name/Foo
Note the lack of a trailing space. If you now follow the relative 'bar'
link, you'll neatly end up in http://your.server.name/Foo/bar.
However, had you removed the BASE tag, your browser would have attempted to
load http://your.server.name/bar instead. This is because the relative URL
is offset against the last slash in the URL. The BASE tag however, tells
your browser that the actual URL of the document it is showing, contains an
additional slash.
So, unless you have a really good reason, you don't want to remove that
slash. And if you do, you have to make absolutely sure that the visitor will
never end up on a URL of which the browser needs to be notified is different
from the actual URL.
Martijn Pieters
| Software Engineer mailto:mj@digicool.com
| Digital Creations http://www.digicool.com/
| Creators of Zope http://www.zope.org/
| The Open Source Web Application Server
---------------------------------------------