Default contentType problem
The default contentType set in ajaxSettings is wrong : in Chrome, there is a problem with the charset used.
by vinzweb
HTML
<div id="result">
The default contentType of jquery doesn't mention the default charset.
In Firefox, the contentType is automatically updated with "application/x-www-form-urlencoded; charset=UTF-8", or in Google Chrome, the jquery default contentType is used, so "application/x-www-form-urlencoded" (look at the contentType in the request headers).
Although the default charset is UTF-8 for all XHR posts, why don't specify it to be cross-browser ?
</div>
JavaScript
$.ajaxSetup({
url: "/echo/html/",
global: false,
dataType: "text/html",
type: "POST"
});
$.ajax({
data: {
html: "ton père"
}
});