Skip to content

Commit 517615b

Browse files
ksokhankswedberg
authored andcommitted
jQuery.ajax(): Note settings that could trigger a preflight OPTIONS request. Closes jquery#488
1 parent 03710c0 commit 517615b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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 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>
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. <strong>Note:</strong> For cross-domain requests, setting the content type to anything other than <code>application/x-www-form-urlencoded</code>, <code>multipart/form-data</code>, or <code>text/plain</code> will trigger the browser to send a preflight OPTIONS request to the server.</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:

0 commit comments

Comments
 (0)