Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Good day, sorry for the seemingly broad question title.

I am building an ExtJS4 application using php and sql for the user data. Everything was going fine until one day, I notice this error in my java console:

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

Initially, I wasn't that troubled since my application was loading fairly well while testing it in my local network. However, once I uploaded to an online server and tested it, the application loaded really slowly and sometimes it wouldn't load at all.

I don't recall calling an XMLHttpRequest anywhere in my application, so I'm dumbfounded on how or why I'm getting this warning all of a sudden.

The only way I connect to my database and back is via Stores.

Also, as a side question, is there a way to make ExtJS4 applications load faster? I've minimized the size of the images/icons I use and I think the issue lies with the stores but none of my stores are set on autoload.

Any help is very much appreciated. Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
493 views
Welcome To Ask or Share your Answers For Others

1 Answer

I had this error a while a ago. It is caused by Ext.Loader which loads the Ext classes dynamically.

I could solve it by adding the required classes in the Ext.require([...]) statement in the main js file of my application (i.e. app.js).

The docs for Ext.Loader explain when and why asynchronous and synchronous loading happens.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...