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

流过昼夜 提交于 2019-11-27 00:21:17

问题


http://www.example.com?foo

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


回答1:


Its 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



回答2:


It's called "query string" as you can see in wikipedia.




回答3:


The "foo" part of the URL, as you put is, is referred to as the query.

source: http://tools.ietf.org/html/rfc3986#section-3.4




回答4:


The 'foo' only is called String Parameters of the URL Query




回答5:


Depends on the technology you use. Usually its called name value pair. Query string refers to the whole string after ? sign. Then depending on technology used that query string is parsed and normally appears as the dictionary. For example, http://www.example.com?foo=bar&foo1=bar1: Request["foo"] yields "bar" Request["foo1"] yields "bar1" for asp or $_GET["foo"] -> "bar" for php and so on.



来源:https://stackoverflow.com/questions/4007754/whats-the-term-for-the-part-of-the-url-after-the-question-mark

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!