Opened 2 years ago

Last modified 4 months ago

#1730 new defect

Try to get rid of synchronous XMLHTTPRequest

Reported by: gogo Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc:

Description

Synchronous XMLHTTPRequests should be avoided where possible, even if that means just faking a synchronous perhaps by spin-waiting until it's complete, just in case Chrome actually removes sycnhronous requests. Main candidate is _geturlcontent() in XinhaCore?, used by Skin, Language and Icon loading.

http://trac.xinha.org/ticket/1729

A synchronous XMLHttpRequest request on the main thread is deprecated due to the negative effects on the user experience. For more information see ​http://xhr.spec.whatwg.org/ XinhaCore??.js: 8248:2

Change History (1)

comment:1 in reply to: ↑ description Changed 4 months ago by guest

Replying to gogo:

Synchronous XMLHTTPRequests should be avoided where possible, even if that means just faking a synchronous perhaps by spin-waiting until it's complete, just in case Chrome actually removes sycnhronous requests. Main candidate is _geturlcontent() in XinhaCore?, used by Skin, Language and Icon loading.

I apologize... I understand the concept but I'm not so good at putting it into practice. Could you give me an example to have a work track?

Note: See TracTickets for help on using tickets.