#18468 closed defect (worksforme)
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Reported by: | mmosttler | Owned by: | mmosttler |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | General | Version: | 1.7.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I am receiving this error pointing to dojo.js line 5 (of our dojo build). It seems the this is being triggered by the first require([]); on our page after loading dojo.
the full message is:
"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/"
Change History (7)
comment:1 Changed 6 years ago by
Owner: | set to mmosttler |
---|---|
Status: | new → pending |
comment:2 Changed 6 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:3 Changed 6 years ago by
It looks like this occurs because timezone info files are specifically requested with sync: true
. I'd like to re-open this ticket and discuss the best way to fix it.
Is there a specific reason that these files are requested in this manner? I see that there's a TODO in the code to refactor this request to be more like requireLocalization
, but there must be a reason that wasn't just done in the first place.
comment:4 Changed 6 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Are you implying that you tried setting async:true and it still follows that code path that requests the files with async:true?
comment:5 Changed 6 years ago by
Apologies; it looks like we conflated async: true
in our build profile with async: true
in our dojoConfig
. Changing the latter seems to skirt around this issue.
That TODO still remains, and that code still does request files synchronously, but perhaps that's for another ticket.
Thanks for taking a look and sorry for the false alarm.
comment:6 Changed 6 years ago by
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
OK, great. I'm going to close this then. Given your statement, that synchronous code branch is probably just part of the vestigial code left over to support dojo's legacy async:false mode. So, it will go away in version 2 but presumably not before then.
comment:7 Changed 6 years ago by
I'm really sorry for the back and forth, but it looks like dojox/date/timezone
*does* cause synchronous requests. I'm going to open a new ticket though, because this description is vague and possibly not specific to the timezone data files.
try setting
async: true
in yourdojoConfig
. does that fix it?