Details
-
Type:
Task
-
Status: Closed
-
Priority:
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>
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
Field | Original Value | New Value |
---|---|---|
Assignee | Mircea Toma [ mircea.toma ] |
Fix Version/s | EE-4.2.0.GA [ 13071 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Won't Fix [ 2 ] |
Security | Private [ 10001 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
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.