Let's say I simply want to link to another page within my site. I can use the following options:
<!-- relative path -->
<a href="/order-pizza.html">Order Pizza</a>
<!-- absolute path -->
<a href="http://www.mywebsite.com/order-pizza.html">Order Pizza</a>
<!-- protocol-relative path -->
<a href="//www.mywebsite.com/order-pizza.html">Order Pizza</a>
- Is there a difference in response time when comparing protocol-relative to relative?
- Are there any drawbacks when using protocol-relative paths with HREFs?
Relative, absolute, or protocol relative URLs are browser features.
The browser combines the new URL with the page URL to build a complete URL to send a request to.
It has no effect on the network.