What's the term for the part of the URL after the question mark?

22,030

Solution 1

It's the query, or sometimes the query string.

To pinch a useful diagram from the URI RFC:

     foo://example.com:8042/over/there?name=ferret#nose
     \_/   \______________/\_________/ \_________/ \__/
      |           |            |            |        |
   scheme     authority       path        query   fragment

Solution 2

It's called the "query string", as you can see on Wikipedia.

Solution 3

The query.

https://www.rfc-editor.org/rfc/rfc3986#section-3.4

Share:
22,030

Related videos on Youtube

Emanuil Rusev
Author by

Emanuil Rusev

Designer, developer, minimalist, maker of Nota, Historie, Parsedown.

Updated on October 02, 2021

Comments

  • Emanuil Rusev
    Emanuil Rusev over 2 years

    http://www.example.com?foo

    What's the term for the foo part of the URL?

  • Sankalp Kotewar
    Sankalp Kotewar about 5 years
    In the link mentioned in the question, 'example.com?foo' is it possible to have just foo and no assignment (like 'name=ferret' in your example)? If yes, that what would be foo's work over there?
  • Trect
    Trect over 4 years
    @SankalpKotewar No, you cannot have that without a assignment. The query should have the form field=value. Check this[en.wikipedia.org/wiki/Query_string]
  • Boris Verkhovskiy
    Boris Verkhovskiy over 2 years
    @SankalpKotewar the convention is to have your query in this format: ?foo=bar&baz=qux but nothing forces you to do that and the query can pretty much be any text (except it can't contain a #). So yes, it's possible. http://example.com/????? is a valid URL for example.