ICEfaces
  1. ICEfaces
  2. ICE-11308

suppress javascript console warning for deprecated Synchronous XMLHttpReques

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.2
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Chrome

      Description

      The following javascript warning appears in the showcase example:-
      coalesced.js.jsf?ln=ice.core&dgst=9ybhzt:1266 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.

      for source of issue see:- https://stackoverflow.com/questions/24639335/javascript-console-log-causes-error-synchronous-xmlhttprequest-on-the-main-thr

      This appears to be an issue with jquery mixing script tag with html.
       A filter (suggested on the above link) may suppress this warning:- <script>$.ajaxPrefilter(function( options, originalOptions, jqXHR ) { options.async = true; });</script>

        Activity

        Hide
        Mircea Toma added a comment -

        This is not an issue with jQuery, it is our DOM update extension. Whenever the head of the document is updated the bridge will fetch the newly referenced Javascript and/or CSS resources. The fetching of these resources needs to be synchronous so that the code is evaluated before the DOM updates (that use the new code) are applied. Really, we don't have any option but to leave in the synchronous requests.
        Also looking at the latest spec ( https://xhr.spec.whatwg.org/ ) referenced by the warning I cannot see any deprecation relative to the synchronous requests.

        Show
        Mircea Toma added a comment - This is not an issue with jQuery, it is our DOM update extension. Whenever the head of the document is updated the bridge will fetch the newly referenced Javascript and/or CSS resources. The fetching of these resources needs to be synchronous so that the code is evaluated before the DOM updates (that use the new code) are applied. Really, we don't have any option but to leave in the synchronous requests. Also looking at the latest spec ( https://xhr.spec.whatwg.org/ ) referenced by the warning I cannot see any deprecation relative to the synchronous requests.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: