title: Deprecation Synchronous XMLHttpRequest, pure JavaScript
body: <p>i use this javascript code for a API request to get a JSON.</p>
  
  <pre><code>function loadJSON(url) {
      var xobj = new XMLHttpRequest();
      xobj.overrideMimeType('application/json');
      xobj.open('GET', url, false);
      xobj.onreadystatechange = function () {
          if (xobj.readyState == 4 &amp;&amp; xobj.status == '200') {
              // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode
              returnval = JSON.parse(xobj.responseText);
          }
      };
      xobj.send(null);
      return returnval;
  }
  </code></pre>
  
  <p>The code is in a mouse-click event. The full URL is generated with data from the mouse click. The code is only work with sync. I have tested the code with async, but with this the code don't work.
      xobj.open('GET', file, true, null, null);</p>
  
  <p>With sync, the console write:</p>
  
  <blockquote>
    <p>[Deprecation] 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="https://xhr.spec.whatwg.org/" rel="nofollow noreferrer">https://xhr.spec.whatwg.org/</a>.</p>
  </blockquote>
  
  <p>OK, hey! There a many Threads with this question, but i don't found a solution. I use pure JavaScript, no Ajax, no JQuery.</p>