Yeah wrote:
Is it absolutely necessary to include "http://" in an A HREF hyperlink?
Would it be wise to remove this from one's Links page, just to save code?
In addition to all the other answers about relative links, you
should recognize that not all links use the hyper-text transfer
protocol (HTTP). For example, a link to send E-mail to the
anti-spam address I used for this message would be
<a href="mail:no** **@nowhere.not" >Mail to me</a>
And a link to reach this newsgroup through your default news server
would be
<a href="news:comp .infosystems.ww w.authoring.htm l">Authoring
HTML</a>
Specifying a particular news server would be
<a
href="news://news.vcnet.com/comp.infosystem s.www.authoring .html">Authorin g
HTML</a>
Generally, when I refer to a page in my own Web site from another
page in the same site, I user relative links. This facilitates
both testing and rehosting.
For testing, links relative to my home page allow me to recreate my
Web site in a local directory on my PC. This means that I can
navigate through my site without even connecting to the Internet.
Thus, I can check the appearance of a page and the integrity of
links without having to upload the pages to a Web server.
If I want to rehost my Web site, none of my links require
changing. I only have to change text that cites the domain. Yes,
I now have a personal domain, which means that rehosting merely
requires pointing the domain to the new server and uploading the
files, even if my links used complete URLs. However, if I were to
change the name of my domain, relative links mean that I would not
have to change them.
--
David E. Ross
<http://www.rossde.com/>
Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>