froggyboy604
Seasoned Veteran
a relative path looks like
while an absolute path looks like
. I read online from members that using an absolute path might make indexing easier for some search engine bots vs using an absolute path.
While an relative link path is faster to type, and it is possible to move your HTML website to a new website domain name without rewriting the http://example.com part.
I also read for images it is better to use a relative path like
instead of
which is a an absolute path.
When is it appropriate to use a relative path and when is it better to use an absolute path on a HTML website?
Code:
<a href="/blog">blog</a>
Code:
<a href="http://example.com/blog">blog</a>
While an relative link path is faster to type, and it is possible to move your HTML website to a new website domain name without rewriting the http://example.com part.
I also read for images it is better to use a relative path like
Code:
<img src="/pics/logo.jpeg">
Code:
<img src="http://example.com/pics/logo.jpeg">
http://www.bloggingjunkie.com/how-to-sp ... rt-ii.htmlUsing absolute path for images, Flash, JavaScript and movie clips surely increases http request. So use relative path instead of absolute path to reduce the HTTP request.
When is it appropriate to use a relative path and when is it better to use an absolute path on a HTML website?







