There's no simple way to import scripts in wiki pages with RL, except for building URLs manually. With the deprecation of legacy JS API, a good way to do it in RL is needed. It would be better that it can be done with page revision check as well.
Just an imagination:
- Several scripts call a function individually:
mw.loader.pageLoad('User:Liangent/Scripts/a.js');
mw.loader.pageLoad('User:Liangent/Scripts/b.js');
mw.loader.pageLoad('User:Liangent/Scripts/c.js');
- At the end something calls:
mw.loader.pageGo();
- A <script src="load.php?page[]=User:Liangent/Scripts/a.js&page[]=User:Liangent/Scripts/b.js&page[]=User:Liangent/Scripts/c.js"> is inserted. Make this call non-cachable at browser side, possibly cachable at server side (squid level?) and invalidated on edits of any of .../a.js, b.js or c.js.
- In its content it imports (minified contents of) .../a.js, b.js and c.js individually, with timestamps or revision ids in URLs and make them permanently cached.
Version: 1.18.x
Severity: enhancement