ResourceLoader/zh

‘ResourceLoader’是MediaWiki中的传递系统，用于提供JavaScript、CSS、界面图标和本地化文本. 它于2011年首次部署到维基百科，并于同年晚些时候作为的一部分发布.

它负责MediaWiki的低成本高性能前端，该前端构建在三原则之上，使Web客户端能够在不到5分钟的时间内在所有页面上快速部署新代码.



关于资源加载器


2010年，由Roan Kattouw、Trevor Parscal和Timo Tijhof创建了资源加载器.

资源加载器按需加载脚本和样式资源，并且仅为能够运行它们的浏览器加载. 一些突出的功能：

Both JavaScript files, CSS files and interface messages are loaded in a single request.
 *  Minifying and concatenating 
 *  This reduces the size of the code, saving bandwidth cost and download time. 

The server can provide multiple module bundles in response to a single request from the browser. These are unpacked in the browser and can be re-used from the cache on subsequent page views, even if they need a different set of modules.
 *  Batch loading and local cache defragmentation 
 *  This reduces the number of requests made. 

A module can contain static files but also generated data from PHP, and virtual files that represent source code from an external source (e.g., a wiki page).
 *  Bundle static files with generated data and virtual files 
 *  This allows granular configuration without overhead of additional API requests.