Skip to main content

Bug Tracker

Side navigation

#6138 closed enhancement (invalid)

Opened February 21, 2010 10:37AM UTC

Closed December 02, 2010 08:07AM UTC

Last modified March 13, 2012 11:42PM UTC

Add option to not delete jsonpCallback upon execution

Reported by: orensol Owned by: orensol
Priority: undecided Milestone: 1.4.2
Component: ajax Version: 1.4.1
Keywords: jsonp, jsonpcallback, garbage collection, cache Cc:
Blocked by: Blocking:

When using jsonpCallback to set a static callback function, there should be the ability to have the function remain in scope and not garbage collected.

If I call the exact same jsonp request twice, the first jsonpCallback execution deletes itself, and then the second fails on being undefined.

Maybe there's also an option to cache the response of the first request, and on subsequent requests return the cached result instead of making the entire request and callback cycle?

Attachments (0)
Change History (5)

Changed October 16, 2010 04:13PM UTC by addyosmani comment:1

priority: → undecided
type: bugenhancement

Changed October 18, 2010 10:28PM UTC by snover comment:2

owner: → orensol
status: newpending

I am not sure I understand this. Can you provide a test case?

Changed November 02, 2010 07:46PM UTC by aboushley comment:3

So I think I've produced a test case for what I think orensol is getting at. The callback function isn't deleted, but the jsonp works fine the first time and then after that the callback function is called, but an error is thrown "Uncaught Error: NOT_FOUND_ERR: DOM Exception 8" -- jquery-1.4.3.min.js:135 I know the errors on minified js so its not as helpful, but this fiddle shows it happening.

Changed November 11, 2010 12:17AM UTC by jitter comment:4

Replying to [comment:3 aboushley]:

So I think I've produced a test case for what I think orensol is getting at.

No, what you reproduced is the bug reported in #7418. Which is an exception when trying to remove a script tag in the internal callback handler

Changed December 02, 2010 08:07AM UTC by trac-o-bot comment:5

resolution: → invalid
status: pendingclosed

Automatically closed due to 14 days of inactivity.