Opened 12 years ago
Closed 12 years ago
#8764 closed bug (wontfix)
Regression in getJSON
Reported by: | Owned by: | jaubourg | |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | ajax | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using $.getJSON for a JSONP request always adds a parameter &_=somenumber to the URL which can break the request, because not all server system do expect a parameter called _ in the request.
Using the example from http://api.jquery.com/jQuery.getJSON/ demonstrates the problem when using jQuery 1.5.2 and viewing the request using FF and Live HTTP Header. Running the same example in 1.4.4 doesn't add that parameter.
$.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?", { tags: "cat", tagmode: "any", format: "json" }, function(data) { alert('test'); });
Change History (2)
comment:1 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Owner: | set to jaubourg |
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
It's because default for cache option is false in the context of a script request (which jsonp is). You have several solutions around this:
Lots of alternatives here.