URL Relative Syntax and Base URLs

The URL syntax described so far is sometimes said to specify an absolute URL. This is because the information in the URL is sufficient to completely identify the resource. Absolute URLs thus have the property of being context-independent, meaning that users can access and retrieve the resource using the URL without any additional information required.

Since the entire point of a URL is to provide the information needed to locate and access a resource, it makes sense that we would want them to be absolute in definition most of the time. The problem with absolute URLs is that they can be long and cumbersome. There are cases where many different resources need to be identified that have a relationship to each other; ...

Get TCP/IP Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.