What Happens If a URL Starts with Path or File name

Q

What Happens If a URL Starts with Path or File name? - XHTML 1.0 Tutorials - Understanding Hyper Links and URLs

✍: FYIcenter.com

A

If a URL starts with a path name, the browser will borrow the protocol name, the host name, and the port number from the URL of the current document to make up the missing parts. For example, if the following URL is used in this document you are viewing right now:

  /faq/xhtml/index.html

your browser will borrow the protocol name, the host name, and the port number from the URL of this document, and produce the following URL:

  http://dev.fyicenter.com:80/faq/xhtml/index.html

If a URL starts with a file name, the browser will borrow the protocol name, the host name, the port number, and the path name from the URL of the current document to make up the missing parts. For example, if the following URL is used in this document you are viewing right now:

  index.html

your browser will borrow the protocol name, the host name, the port number, and the path name from the URL of this document, and produce the following URL:

  http://dev.fyicenter.com:80/faq/xhtml/index.html

2007-05-12, 4724👍, 0💬