2017.03.28
カテゴリ:JavaScript
jQueryのAjaxでワーニングが出ているが・・・
簡単なJavaScriptの中で、
var rText = $.ajax({
type: "POST",
url: "sample.ajax.php",
data: {
"hoge" : "test1234",
"fuga" : "test1122"
},
async: false
}).responseText;
の様にすると、Chromeの開発ツールでは、
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
これをGoogle翻訳で訳すと次の様になる。
メインスレッド上の同期XMLHttpRequestは、 エンドユーザーの経験に有害な影響を与えるため、非推奨です。 詳細については、https://xhr.spec.whatwg.org/を参照してください。
https://xhr.spec.whatwg.org/ をちらっと見るが、ちらっと見る程度ではわからない。