Fetch() API by itself doesn’t allow canceling programmatically a request. To stop a request at the desired time you need additionally an abort controller. In Chrome a network request timeouts at 300 seconds, while in Firefox at 90 seconds. If the request takes longer than 6 seconds, the request is canceled and a timeout error is thrown.

4m read timeFrom dmitripavlutin.com
Post cover image
2 Comments

Sort: