Click to See Complete Forum and Search --> : a href page link query


moondance
09-18-2003, 06:34 AM
hmmm just wondering something

i noticed that when i upload a web page, with say a link to another web page in the same directory, the hyperlink from the first page can just be <a href = "page2.html">, because i assume its in the same directory.

Is there any difference / advantage between having your links as :

<a href = "page2.html">

or

<a href = "http://www.mydomain.com/page2.html">

?

nathan.russell
09-18-2003, 06:53 AM
I've a feeling that if your href is fully qualified with the http://hostname.domainname/......
it will do a DNS lookup on that domain name to get the IP address.
So, I guess you could argue its not as efficient ?? as its making un-necessary DNS lookups ?

But I could be wrong ....

moondance
09-18-2003, 08:40 AM
thats exactly along the lines of what i was thinking - if you state the full address, instead of looking for the file in the domain/ web space, it will go through all the process of searching for it across the internet, all the hops and redirections, so in effect, if you put the full address, you making the broswer search for another page across the internet, whereas if you just state the page2.html, it will be a quicker retreival because it will only look in the domain.

I think i repeated mself about 4 times in there. You get the idea.

I was just wondering if there was anything wrong with it, say security wise, performance wise, etc, cos in logic it seems to be best way of linking pages.

:confused:

thanks for the reply