Bug Tracker

Modify

Ticket #1863 (closed enhancement: duplicate)

Opened 6 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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.

Change History

comment:1 Changed 6 years ago by john

  • Component changed from core to ajax

comment:2 Changed 6 years ago by morgan

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

comment:3 Changed 4 years ago by john

  • Status changed from new to closed
  • Version changed from 1.2.1 to 1.3.2
  • Resolution set to duplicate
  • Milestone changed from 1.2.2 to 1.4

We'll work on this in bug #3442.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.