AJAX JSONP call automatically adding callback parameter. How to remove that?
ajax, jquery, jsonp
Solution
You should set `jsonp: false` and not `jsonpCallback: false`. You should also explicitly set the `jsonpCallback` option to the callback name you expect to receive from the service.
Reference: http://api.jquery.com/jQuery.ajax/
Problem
I have few Services- with clean-URLs and while calling each service, the URL pattern is being checked. Now am calling those URLs via AJAX from another server using JSONP technique. But, while calling, its adding `callback` and `_(timestamp)` parameters with service-URLs, automatically. The timestamp parameter is removed- by adding `cache : true` . But cant remove the callback parameter. here is my AJAX calling code- ``` $.ajax({ type: 'GET', url : "http://test.com/test/services/getFollowMeHistory/1/1/50", dataType:'jsonp', cache : true, crossDomain : true, //jsonpCallback : false, error : function(XMLHttpRequest, textStatus, errorThrown) { alert("Error occured while loading Loads."+textStatus); } }); }); ``` Its calling the URL as- `http://test.com/test/services/getFollowMeHistory/1/1/50?callback=false` and am getting 404 from service side. My service is returning data as callbackMethod( {..JSON RESPONSE...} ). So, it will automatically call the `function callbackMethod(data)` in my script. i dont need that callback parameter in my URL. Just need to remove the `?callback=...` part from URL Plz help.