0

I try to load data from server to an element with jQuery.get on an element mouseover. I have this function:

$('#myButton').on('mouseover', function() {$.get('/myPage', function(data){$('#elem').html(data)})});

The content of /myPage loads but the console returns the following warning:

[Deprecation] Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the end's user experience.

This warning does not appear if I just try to display data in console.

user8171079
  • 337
  • 5
  • 16

1 Answers1

0

I think you should check your environment to see what cause the issue exactly. You cannot generate synchronous request from jQuery.get() method because it is a wrapper of jQuery.ajax() with default "async" option set to "false"