When passing jsonp parameter, the API returns "application/json" instead of "application/javascript".

I found this because if you do:

<script src='http://api.stackoverflow.com/1.0/badges?jsonp=results'></script>

On Google Chrome, it doesn't work. You need to add

<script src='http://api.stackoverflow.com/1.0/badges?jsonp=results' type='text/javascript'></script>

And even then you get a warning in the console.

Nothing serious but it's not a big change either.

1 Answer 1


Its odd that no-one complained about this oversight for so long, good catch.

This has been deployed to the API, StackAuth will follow sometime in the near-ish future.

  • 1
    maybe not a lot of people are using the jsonp variant of the API Commented Oct 11, 2010 at 19:55
  • @Pablo: Well, I'm not too sure about that - I'm using it quite a bit. Commented Nov 10, 2010 at 22:13
  • @pablo's statement that 'it doesn't work' is incorrect. the content-type may not be correct but chrome handles it just fine, with a warning. both george and i have been leveraging jsonp since day 1 with full browser support. Commented Nov 12, 2010 at 2:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .