还有其他优点,例如中止请求的能力,也是CORS自带的。
There are other advantages, such as the ability to abort requests, that also comes with CORS.
如果没有模块返回OK某些阶段会中止请求(即,如没有模块要应答要求)。
Some phases will abort the request if no module returns OK (i. e., if no modules will touch the request).
在这种情况下,如果在合理的时间段内没有得到响应,不妨采用一种有效策略:中止请求然后重新发送。
A good strategy that works in many cases is to abort a request and resend it if you don't get a response in a reasonable time frame.
应用推荐