Предупреждение в консоли: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience
На странице есть такой код:
$('.hover-modal').hover(function(){
$('.popup_custom').show()
})
$('.close_button').click(function(){
$('.popup_custom').hide()
})
if(device.mobile() || device.ipad() || device.android())
{
$("#ytplayer").append("<img src=\"images/preloader_Youtube.gif\" id=\"apYou\">");
$('.hover-modal').remove();
$(".anticlicker").css('bottom','65%');
setTimeout(function(){
$('#apYou').hide();
$("#ytplayer").append("<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/FrgyUDAnDQY?mute=0&autoplay=1&controls=1&disablekb=0&loop=1&modestbranding=1&rel=0&showinfo=0&playlist=FrgyUDAnDQY\" frameborder=\"0\" allowfullscreen=\"\"></iframe>");
},2000)
}
else {
$("body").append("<script src=\"js/youtubeUP.js\"><\/script>");
}
Из-за этого кода в консоли появляется предупреждение: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Из-за строки: $("body").append("<script src=\"js/youtubeUP.js\"><\/script>");
В чем может быть проблема, почему появляется предупреждение?