Base Path for Link Tag


Base Path for Links:
It is not required to give a complete URL for every link. You can get rid of it if you will use
<base> tag in your header. This tag is used to give a base path for all the links. So your
browser will concatenate given relative path to this base path and will make a complete URL.
For example we have used following base tag in all the pages at domain.com:
<head>
</head>
So now if you will use
<a href=”/test/index.htm”>
then it will be considered as <a href=”http://www.domain.com//test/index.htm”&gt;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s