List Info

Thread: Re: URLs in hrefs




Re: URLs in hrefs
user name
2007-04-23 07:22:25
On 4/23/07, Michael Smethurst <Michael.Smethurstbbc.co.uk> wrote:
> But the question remains:
> Microformats aside, if I'm making a new website from
scratch (no legacy
> code/markup) and I want to encourage others to hack,
mashup, interwingle it
> with other data is it best to use /radio4 or http://www.bbc.co.uk/radi
o4
> ?

you can have the best of both worlds. In each <a
href=""> just use
"/radio4". This makes the link relative. But then
you can also add a
<base href="http://bbc.co.uk/"&g
t; when this is in your HTML it will make
all the hrefs absolute (or it should for any decent
parser).

The advantage of using the <base> element is that you
can easily
switch it to something like <base href="http://my-dev-
site.bcc.co.uk">
and you don't have to rewrite all the hrefs within the
HTML.

-brian

-- 
brian suda
http://suda.co.uk
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: URLs in hrefs
user name
2007-04-23 07:33:31
"Brian Suda" <brian.sudagmail.com> writes:

> you can have the best of both worlds. In each <a
href=""> just use
> "/radio4". This makes the link relative. But
then you can also add a
> <base href="http://bbc.co.uk/"&g
t; when this is in your HTML it will make
> all the hrefs absolute (or it should for any decent
parser).
>
> The advantage of using the <base> element is that
you can easily
> switch it to something like <base href="http://my-dev-
site.bcc.co.uk">
> and you don't have to rewrite all the hrefs within the
HTML.

Hey! Good suggestion.

Easy to generate as well.

-- 
Nic Ferrier
http://www.tapsellfer
rier.co.uk   
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: URLs in hrefs
user name
2007-04-23 07:47:02
On 4/23/07, Brian Suda <brian.sudagmail.com> wrote:
> you can have the best of both worlds. In each <a
href=""> just use
> "/radio4". This makes the link relative. But
then you can also add a
> <base href="http://bbc.co.uk/"&g
t; when this is in your HTML it will make
> all the hrefs absolute (or it should for any decent
parser).
>
> The advantage of using the <base> element is that
you can easily
> switch it to something like <base href="http://my-dev-
site.bcc.co.uk">
> and you don't have to rewrite all the hrefs within the
HTML.

With the slight downside that it makes your code a little
more
brittle, as you have to make sure the URI shown in BASE is
the right
thing!

Regards, etc...

-- 
David Janes
Founder, BlogMatrix
http://www.blogmatrix.com
http://blogmatrix.bl
ogmatrix.com
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: URLs in hrefs
user name
2007-04-25 10:51:01
Simple and elegant

For some reason I'd always thought base was something set in
the http header
rather than the markup

The longer I spend with html the less I think I know

Anyway thanks for your help


On 23/4/07 13:22, "Brian Suda" <brian.sudagmail.com> wrote:

> On 4/23/07, Michael Smethurst <Michael.Smethurstbbc.co.uk> wrote:
>> But the question remains:
>> Microformats aside, if I'm making a new website
from scratch (no legacy
>> code/markup) and I want to encourage others to
hack, mashup, interwingle it
>> with other data is it best to use /radio4 or http://www.bbc.co.uk/radi
o4
>> ?
> 
> you can have the best of both worlds. In each <a
href=""> just use
> "/radio4". This makes the link relative. But
then you can also add a
> <base href="http://bbc.co.uk/"&g
t; when this is in your HTML it will make
> all the hrefs absolute (or it should for any decent
parser).
> 
> The advantage of using the <base> element is that
you can easily
> switch it to something like <base href="http://my-dev-
site.bcc.co.uk">
> and you don't have to rewrite all the hrefs within the
HTML.
> 
> -brian


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may
contain personal views which are not the views of the BBC
unless specifically stated.
If you have received it in error, please delete it from your
system.
Do not use, copy or disclose the information in any way nor
act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )