Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19423

Warning about synchronous XMLHttpRequest in the JavaScript console

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 13.10.2
    • None
    • Unknown

    Description

      The following warning message is logged in the JavaScript console when accessing XWiki pages:

      Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience. For more help http://xhr.spec.whatwg.org/
      

      The warning appears to be linked to xwiki.js but in fact the problem is on the jQuery side:

      Some parts of the XWiki UI are loaded asynchronously. This usually means making an HTTP request to retrieve some additional HTML fragment which may require some additional JavaScript code and CSS. These additional resources are either included in the HTML or returned using custom HTTP headers (see XWIKI-18895). In both cases the HTML (with the script and link tags) is inserted in the DOM using jQuery.

      The problem is https://github.com/jquery/jquery/issues/1895 : DOM inserted scripts are fetched (and executed) synchronously by jQuery's _evalUrl internal function. See also https://github.com/jquery/jquery/issues/2012 .

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: