Skip to content

Commit 493d13b

Browse files
committed
fixup! jQuery.ajax: Document special handling of a double question mark
1 parent 21a9eb3 commit 493d13b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

entries/jQuery.ajax.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ $.ajax({
8787
<desc>
8888
<p>Data to be sent to the server. If the HTTP method is one that cannot have an entity body, such as GET, the <code>data</code> is appended to the URL.</p>
8989
<p>When <code>data</code> is an object, jQuery generates the data string from the object's key/value pairs unless the <code>processData</code> option is set to <code>false</code>. For example, <code>{ a: "bc", d: "e,f" }</code> is converted to the string <code>"a=bc&amp;d=e%2Cf"</code>. If the value is an array, jQuery serializes multiple values with same key based on the value of the <code>traditional</code> setting (described below). For example, <code>{ a: [1,2] }</code> becomes the string <code>"a%5B%5D=1&amp;a%5B%5D=2"</code> with the default <code>traditional: false</code> setting.</p>
90-
<p>When <code>data</code> is passed as a string it should <strong>already be encoded</strong> using the correct encoding for <code>contentType</code>, which by default is <code>application/x-www-form-urlencoded</code>. If the string contains a double question mark (<code>??</code>) it is replaced with a value generated by jQuery that is unique for each copy of the library on the page (e.g. <code>jQuery21406515378922229067_1479880736745</code>).</p>
90+
<p>When <code>data</code> is passed as a string it should <strong>already be encoded</strong> using the correct encoding for <code>contentType</code>, which by default is <code>application/x-www-form-urlencoded</code>.</p>
91+
<p>In requests with <code>dataType: "json"</code> or <code>dataType: "jsonp"</code>, if the string contains a double question mark (<code>??</code>) anywhere in the URL or a single question mark (<code>?</code>) in the query string, it is replaced with a value generated by jQuery that is unique for each copy of the library on the page (e.g. <code>jQuery21406515378922229067_1479880736745</code>).</p>
9192
</desc>
9293
</property>
9394
<property name="dataFilter" type="Function">

0 commit comments

Comments
 (0)