Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the term for the last part of the path of a URL

Tags:

url

web

What term do you give the part of the url after the last slash, but before the query? It seems most places people call it "the last part of the path" e.g. here but that is just so... wordy.

E.g. "something" in this url:

http://www.example.com/path/to/something?param=foo

Update:

I was hoping there was a well-known answer that I was not aware of, but it seems there is still some debate so, that's my answer right there. Guess I'll just keep calling it "the part of the path after the last slash". But I'll leave this question open anway, in case someone makes a convincing argument that gets lots of upvotes.

like image 515
Kevin Pauli Avatar asked Jan 03 '13 18:01

Kevin Pauli


People also ask

What is the last part of a URL called?

The part after the TLD is known as the 'path'. This is because it directs the browser to a specific page on the website. In this case, it leads first to our blog, then to a particular post: How to Automatically Find and Fix Broken Links in WordPress. The very last part is also sometimes called a URL 'slug'.

What is the path part of a URL?

The path refers to the exact location of a page, post, file, or other asset. It is often analogous to the underlying file structure of the website. The path resides after the hostname and is separated by “/” (forward slash).


2 Answers

I'm a bit late to the party, but where I work we call it the slug, as mentioned here for example: https://prettylinks.com/2018/03/url-slugs/

like image 71
tommy Avatar answered Nov 25 '22 08:11

tommy


protocol://server.domain/path?query

The path element (and it appears there is no 'defacto' definition) in my mind is the path to the resource on the server. No matter whether the resource is a file (blah.html) or a folder (/path/) it still instructs the server to use the path to find the resource.

Now there appears to be another definition at good/bad ol' Wikipedia here which states that it is usually "http://server/path/program?query_string" where the end resource is defined as 'program' but I think this is incorrect (is a folder a program?)

So.. perhaps its should be

protocol://server.domain/path[/resource.*]?query

? /../../ I traverse...

like image 44
Paul Sullivan Avatar answered Nov 25 '22 08:11

Paul Sullivan