K
ksamdev
That is irrelevant. If you specify everything relative to the
current file, you do not need a BASE tag.
I have a few sites that I manage this way. On my local machine,
they are:
http://cj/cfaj.freeshell.org/
http://cj/torquiz.freeshell.org/
http://cj/woodbine-gerrard.com/
On the Web, they are
http://cfaj.freeshell.org/
http://torquiz.freeshell.org/
http://woodbine-gerrard.com/
They have no BASE tags. There is no difference between the local
files and the files on the Web.
All references are relative to the current file. The sites could be
moved anywhere and everything would still work.
--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
I see, you didn't get my initial point. I have a page that has to use
both paths:
relative to local folder (images specific to current page)
relative to top folder (external resources like: JS, CSS, etc.)
So, question was:
can I specify in my page somehow relation of path whether it has to
be understood by Browser wrt to local folder or top?
Answer: NO.
I can use only one type at a time. Decision was made in account of top
folder. That's why I use BASE link.
My website is heavily loaded with JS and all my libs, scripts should
be using at least relative path to top dir because it is used by
different pages on various levels. This way BASE makes sure everything
works fine.
Downside of current approach - my all img links should be defined
using relative path wrt host that makes it very long. Say:
<img src='pages/articles/1/img/section1/1.png' />
I thought there is some way to get rid of this redundancy especially
if you have say 50 images . JS may be used for this reason but it's
another complication. My original idea is to keep site as simple as it
can be.