Skip to content

Commit 931829e

Browse files
committed
See #13880. Clarify usage of jQuery.ajax contentType.
1 parent e5da273 commit 931829e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

entries/jQuery.ajax.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<desc>An object of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.</desc>
3939
</property>
4040
<property default="'application/x-www-form-urlencoded; charset=UTF-8'" name="contentType" type="String">
41-
<desc>When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to <code>$.ajax()</code>, then it'll always be sent to the server (even if no data is sent). If no charset is specified, data will be transmitted to the server using the server's default charset; you must decode this appropriately on the server side.</desc>
41+
<desc>When sending data to the server, use this content type. Default is "application/x-www-form-urlencoded; charset=UTF-8", which is fine for most cases. If you explicitly pass in a content-type to <code>$.ajax()</code>, then it is always sent to the server (even if no data is sent). The W3C XMLHttpRequest specification dictates that the charset is always UTF-8; specifying another charset will not force the browser to change the encoding.</desc>
4242
</property>
4343
<property name="context" type="PlainObject">
4444
<desc>This object will be made the context of all Ajax-related callbacks. By default, the context is an object that represents the ajax settings used in the call (<code>$.ajaxSettings</code> merged with the settings passed to <code>$.ajax</code>). For example, specifying a DOM element as the context will make that the context for the <code>complete</code> callback of a request, like so: <pre><code>$.ajax({

0 commit comments

Comments
 (0)