阅读背景:

如何在页面加载中获取一些JSON文件?(是同步的不可避免的坏)?

来源:互联网 

I have a web application whose entire functionality is dependent on 3 JSON files being fetched from the server and processed when the main page is loaded. At the moment, I use jQuery AJAX calls, with 'async:false', and it works fine. But everything I read is shouting at me that synchronous AJAX is evil and that I should refactor this to asynchronous behaviour. Of course I could do that, at the expense (as I see it) of making the code rather messier, in that the entire application would be loaded in the AJAX success function. I have a web application whose entire functiona




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: