Last modified: 2014-04-30 16:24:12 UTC
When a wiki has its load.php endpoint on the same domain, and when the load queue is passed the blocking/synchronous part, there is no reason to use <script> for everything. While this won't affect Wikimedia production (not unless we start using local /w/load.php or adopt CORS more in a way that still falls back for older browsers), it will increase performance for the majority of normal installs. In addition, it will allow us to more easily mock the server in our unit tests.
Hm.. upon closer inspection, never mind. We have our own copy of the "script" transport logic of $.ajax, not because jQuery messes up line numbers, but because eval does in general (obviously). If we do our own XHR when possible, we'd have to eval the script since XHR retrieves text only. And XHR is actually less performant than a script. At least enough concerns about it that there's talk in the jQuery team of dropping the XHR pipeline altogether in the "script" code path of $.ajax. See also https://gerrit.wikimedia.org/r/#/c/130602/ which adopts $.ajax again in mediawiki.js (though it doesn't change behaviour).