ajax synchronous call with timeout

后端 未结 2 1521
北恋
北恋 2020-12-18 06:00

New to ajax, so asking a very basic question.

-- Is there no way to make a Synchronous ajax call (async:false) with timeout set on it.?

http://www.ajaxtoolbo

2条回答
  •  -上瘾入骨i
    2020-12-18 06:15

    I don't believe it's possible to set a timeout on a synchronous call. When you set "async:false", I believe the browser actually locks up while waiting for the response. You should only use a synchronous request if you absolutely need to (because of the browser locking up).

提交回复
热议问题