JavaScript synchronization options

前端 未结 6 876
庸人自扰
庸人自扰 2021-02-04 13:44

I was wondering whenever exists a solution to perform synchronization in JavaScript code. For example I have the following case: I\'m trying to cache some response values from A

6条回答
  •  不思量自难忘°
    2021-02-04 14:08

    Yes you can make your xmlHttpRequests synchronous, in non-IE set the asynch option to false on the open method, in IE browsers do the same with the bAsync parameter.

    Maybe you might want to chain your requests somehow. Create a que stack and send the requests as you make your way down the que.

提交回复
热议问题