Absolute vs Relative Links : Technical Difference

被刻印的时光 ゝ 提交于 2019-12-02 09:26:35
Jukka K. Korpela

There is no (measurable) difference in speed or anything as regards to search engines and other software that processes HTML pages as delivered on the web.

The reason is that relative URLs are resolved to absolute URLs applying well-defined algorithms that are known to authors of relevant software. So when your page contains href="../../contact", it will be resolved using the current base URL, and the nanoseconds required for this are ignorable.

The use of relative vs. absolute URLs from the authoring point is a different issue, and well covered in the question already mentioned: Absolute vs relative URLs

Use absolute urls for linking to other web sites, and relative urls if the page your are linking to is in your website. More can be found @ http://kb.iu.edu/data/abwp.html

Absolute URL's are protocol://domain/path

Relative URL's are <a href="foobar.html">The Wonderful World of Foobar!</a>

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!