Page 1 of 1
The Base tag.
Posted: Thu Jul 12, 2007 4:24 am
by onion2k
This should be a really simple question but I can't find the answer anywhere online. Is the <base> tag universally supported (all browsers, all operating systems)? It's a much nicer approach when I'm rewriting URLs to include '/'s than using absolute paths on everything.
Posted: Thu Jul 12, 2007 4:26 am
by Oren
Well, I never heard it's not... so I guess it is (universally supported)
Edit: If you go here:
http://meiert.com/en/indices/html-elements/ it says it is valid HTML 3.2, HTML 4.01, XHTML 1.0, XHTML 1.1 and HTML 5, so I guess you can use it

Posted: Thu Jul 12, 2007 4:39 am
by onion2k
True, it seems that way. But most blog software doesn't use it which leads me to think there's something dodgy about it.
Posted: Thu Jul 12, 2007 5:14 am
by alex.barylski
I've used the tag in my own CMS software and commercial software which I developed. The company I currently work for has used and sold software that relied on it to tens of thousands of people, haven't had a complaint yet.

Posted: Thu Jul 12, 2007 11:04 am
by Luke
I used to use it a lot more. Then I started working with miva and found that there is no easy way (within miva - have I mentioned that I hate miva?) to do something like this:
Code: Select all
<a href="#some-point-on-the-page">This is cool</a>
because that takes you back to whatever the value of base href is. so you go to $basehref#some-point-on-the-page which is rarely what you want. This probably isn't so much of a problem in php because it's easy to find what page you're currently on.
Posted: Thu Jul 12, 2007 11:29 am
by vigge89
I experimented with it for phpFe (to save bandwidths), but it didn't work out very well - I think I had some issues with browsers behaving differentely.
Posted: Thu Jul 12, 2007 2:03 pm
by onion2k
vigge89 wrote:I experimented with it for phpFe (to save bandwidths), but it didn't work out very well - I think I had some issues with browsers behaving differentely.
Can you elaborate? I've tested it in IE6, FF2, Opera and Safari and they're all working ok. Where did you have problems?
Posted: Thu Jul 12, 2007 2:49 pm
by alex.barylski
The Ninja Space Goat wrote:I used to use it a lot more. Then I started working with miva and found that there is no easy way (within miva - have I mentioned that I hate miva?) to do something like this:
Code: Select all
<a href="#some-point-on-the-page">This is cool</a>
because that takes you back to whatever the value of base href is. so you go to $basehref#some-point-on-the-page which is rarely what you want. This probably isn't so much of a problem in php because it's easy to find what page you're currently on.
Dude. Your my hero.
Seriously, your a life saver...this is exactly why I am having the problem with this topic:
viewtopic.php?t=70593
Unfortunately I need <base> tag so I will have to come up with an alternative method, but you just saved me tons of effort in research and investigation. Next beer is on me (not literally of course).
Cheers

Posted: Thu Jul 12, 2007 3:33 pm
by Luke
@hockey -

glad I could help
@onion - I remember when I discovered the base tag I had the same reaction - "Why did I just find out about this?? It's brilliant!"
Posted: Thu Jul 12, 2007 4:08 pm
by vigge89
onion2k wrote:vigge89 wrote:I experimented with it for phpFe (to save bandwidths), but it didn't work out very well - I think I had some issues with browsers behaving differentely.
Can you elaborate? I've tested it in IE6, FF2, Opera and Safari and they're all working ok. Where did you have problems?
I'm afraid I don't really remember, think IE (6 if I remember correctly) ignored the tag completely.
Posted: Thu Jul 12, 2007 4:22 pm
by Luke
I'm afraid I don't really remember, think IE (6 if I remember correctly) ignored the tag completely.
nope