Skip to main content

Bug Tracker

Side navigation

#1863 closed enhancement (duplicate)

Opened October 30, 2007 05:36PM UTC

Closed November 12, 2009 03:06PM UTC

Last modified March 15, 2012 12:57AM UTC

support for error and timeout in JSONP calls

Reported by: tr4nslator Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

As discussed in this thread, jQuery would benefit significantly from the addition of timeout and error handlers for JSONP calls, helping to close the functionality gap XHR calls.

Such support could be added by:

  • using setTimeout before the script is injected to call the error function when the timeout time elapses,
  • using clearTimeout when the script is successfully executed to remove the above call, and
  • using the onerror handler for the script, to call the error function in the event that the script returns a non-200 response (and therefore is not executed).

Also, it would help if the injected script was returned by $.ajax for further manipulation, just as the XHR object is returned for XMLHttpRequest calls.

Attachments (0)
Change History (3)

Changed December 11, 2007 05:00PM UTC by john comment:1

component: coreajax

Changed October 09, 2008 12:46AM UTC by morgan comment:2

See ticket #3442 for JSONP/script abort and timeout patch.

Changed November 12, 2009 03:06PM UTC by john comment:3

milestone: 1.2.21.4
resolution: → duplicate
status: newclosed
version: 1.2.11.3.2

We'll work on this in bug #3442.