(original report at http://comments.gmane.org/gmane.science.linguistics.wikipedia.technical/83171 )
enwiki splits off the file-related parts of Common.js to a subpage and imports it for every page view in the File: namespace via importScript. (There are other examples of high-impact importScript usage; this seemed to be the most prevalent.)
importScript loads pages by appending a script with src <wiki domain>/w/index.php?title=<page>&action=raw&ctype=text/javascript to the head. Besides not being great performance-wise, this leads to the Google Webmaster Tools being spammed by reports of Googlebot being blocked, as these URLs match the robots.txt ban for /w/.
There are two ways of addressing this:
- amend robots.txt to allow index.php with action=raw (seems kind of painful, regular expressions are not great for parsing URL query strings)
- turn some of the code in Common.js into a gadget so it can take advantage of the ResourceLoader infrastructure.