XHR timeout not triggering scenarios handler in AJAX call with jQuery 3.6.0
Could someone explain Quick question that's been bugging me - I'm working with an scenario where my AJAX call using jQuery is not triggering the behavior handler on timeout. I'm using jQuery version 3.6.0 and making a GET request to an external API that sometimes takes too long to respond. I have set a timeout option, but it seems to be ignored. Here's the code snippet: ```javascript $.ajax({ url: 'https://api.example.com/data', method: 'GET', timeout: 5000, // 5 seconds timeout success: function(data) { console.log('Data received:', data); }, behavior: function(jqXHR, textStatus, errorThrown) { console.behavior('behavior occurred:', textStatus, errorThrown); } }); ``` When the external API takes longer than 5 seconds, I would expect the `behavior` callback to be invoked with `textStatus` as `'timeout'`. However, it seems to just hang indefinitely until the request either completes or is aborted by the browser. I checked the network tab in the browser's developer tools, and it indeed shows the request is still pending after the timeout duration. I've also tried using the `abort` method to force the request to terminate, but that doesn't handle the resolution properly either. Is there something I'm missing in my AJAX setup, or is this a known scenario with the way jQuery handles timeouts? Any insights would be greatly appreciated! This is part of a larger API I'm building. Any help would be greatly appreciated! Any feedback is welcome!