Bug Tracker

Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#6138 closed enhancement (invalid)

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?

Change History (5)

comment:1 Changed 12 years ago by addyosmani

Priority: undecided
Type: bugenhancement

comment:2 Changed 12 years ago by snover

Owner: set to orensol
Status: newpending

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

comment:3 Changed 12 years ago by aboushley

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. http://jsfiddle.net/vKHdg/

comment:4 in reply to:  3 Changed 12 years ago by jitter

Replying to 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

comment:5 Changed 12 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.