Last modified: 2014-04-04 12:32:48 UTC
For example, here's a transcript from Firefox 24's Web Console on [[s:en:Help:Introduction]]: -- [13:03:11.991] importScript('w:en:User:Jackmcbarn/advancedtemplatesandbox.js') [13:03:12.029] [object HTMLScriptElement] [13:03:12.225] GET https://en.wikisource.org/w/index.php?title=w:en:User:Jackmcbarn/advancedtemplatesandbox.js&action=raw&ctype=text/javascript [HTTP/1.1 301 Moved Permanently 156ms] [13:03:12.728] GET https://en.wikipedia.org/wiki/en:User:Jackmcbarn/advancedtemplatesandbox.js?action=raw&ctype=text%2Fjavascript [HTTP/1.1 403 Forbidden 203ms] In English, what happened is: 1. I ran "importScript('w:en:User:Jackmcbarn/advancedtemplatesandbox.js')" 2. importScript() (correctly) tried to load the script from the URL https://en.wikisource.org/w/index.php?title=w:en:User:Jackmcbarn/advancedtemplatesandbox.js&action=raw&ctype=text/javascript 3. en.wikisource.org tried to forward that to https://en.wikipedia.org/wiki/en:User:Jackmcbarn/advancedtemplatesandbox.js?action=raw&ctype=text%2Fjavascript 4. en.wikipedia.org rejected the resulting request, reportedly because of something bad IE does with such URLs If en.wikisource.org would forward to https://en.wikipedia.org/w/index.php?title=User:Jackmcbarn/advancedtemplatesandbox.js&action=raw&ctype=text/javascript instead, this whole thing would actually work.
Oh, I forgot to mention the motivation for this to work, which is that this syntax would be more convenient to add to ~/common.js than the calls to mw.loader.load() with gigantic URLs that we have to use now.