Use Promise. Race to implement a timeout mechanism to cancel the XHR request
Let's take a look at how to implement the timeout mechanism using Promise. Race. Of course, XHR has a timeout property, which can be used...
Read More