Synchronous XMLHttpRequest on the main thread is deprecated... Tried many different solution
<p>I know this question was posted so many times in here, but I tried all the solutions I could find on stack overflow and none of them worked.
I'm just trying to make a simple ajax query to load a page inside a div.
Just as simple as:</p>

<pre><code>function loadHome(){
$('#container').html('&lt;div class="loader"&gt;&lt;/div&gt;');
$.ajax({
    type: "GET",
    url: "home.php",
        success: function(msg){
            $("#container").html(msg);
        }
});
}
</code></pre>

<p>And on the console log I get </p>

<blockquote>
  <p>Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check <a href="http://xhr.spec.whatwg.org/" rel="noreferrer">http://xhr.spec.whatwg.org/</a></p>
</blockquote>

<p>And some of my javascript on the home page will not work unless I reload the page. That page is by default loading <code>home.php</code> inside the div already, but I want it to load other pages and then when I click "home" it should load normally, and that's not happening because of that error. I already tried to use "async: true", didn't work. I don't know what to do.</p>