Absolute vs relative vs "slash" URL?

url

Solution

Your first example is a URL. Your second and third examples are not URLs, they're paths. If the path begins with `/` then it's an absolute path, otherwise it's a relative path.

Web browsers generally understand how to interpret a path in relation to the "current" host and path.

Problem

If this full URL: ``` http://domain.com/dir/file.css ``` Is an "absolute URL", where the link will work from any website. And this: ``` ../dir/file.css ``` Is a "relative URL", where the link will only work from that directory path. What is the combination of those two called… ``` /dir/file.css ``` Where the link will work from any location on that site?

Original source