Query string: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
 
Line 48:
For each [[Field (computer science)|field]] of the form, the query string contains a pair <code><var>field</var>=<var>value</var></code>. Web forms may include fields that are not visible to the user; these fields are included in the query string when the form is submitted.
 
This convention is a [[W3C]] recommendation.<ref name="w3c-recom">[https://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type Forms in HTML docu7996139323:AAFBY32zpdiQDXaK4kdTqxvsgRLLNkKmqtEmentsdocuments]. W3.org. Retrieved on 2013-09-08.</ref> In the recommendations of 1999, W3C recommended that all web servers support [[semicolon]] separators in addition to [[ampersand]] separators<ref>[http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2 Performance, Implementation, and Design Notes]. W3.org. Retrieved on 2013-09-08.</ref> to allow [[application/x-www-form-urlencoded]] query strings in URLs within HTML documents without having to entity escape ampersands. Since 2014, W3C recommends to use only [[ampersand]] as query separator.<ref name="w3c-recom-2014">{{cite web | url=https://www.w3.org/TR/2014/REC-html5-20141028/forms.html#url-encoded-form-data | title=4.10 Forms — HTML5 }}</ref>
 
The form content is only encoded in the URL's query string when the form submission method is [[GET (HTTP)|GET]]. The same encoding is used by default when the submission method is [[POST (HTTP)|POST]], but the result is submitted as the [[HTTP request]] body rather than being included in a modified URL.<ref name="html5" />