The callback=?
is a "magic" part of the URL that jQuery recognises, and it changes how the request is made.
The callback parameter in the URL is used in a JSONP request, so jQuery change the request from using XHR (XMLHTTPRequest) to using a script element. It also changes callback=?
in the URL to use a unique function name, something like callback=callback87624827346
.
As the request is not using XHR, it's not subject to the same origin policy. That's why you can make the request (without setting up CORS on the server to make the browser allow the request).