Page MenuHomePhabricator

Set the default parameter for load.php in client-side by a parameter in server-side
Closed, ResolvedPublic

Description

Currently the default parameter for load.php in JavaScript are derived from global config variables and they are a static set:

// Query parameters common to all requests
reqBase = {
	skin: mw.config.get( 'skin' ),
	lang: mw.config.get( 'wgUserLanguage' ),
	debug: mw.config.get( 'debug' )
};

The default parameters should set by server-side and just reflected to the server.

This allows to omit the default values like debug=false from the URL without adding this knowledge to JavaScript. Also the parameter set can extended for T225845.

Event Timeline

Fomafix created this task.Jun 16 2019, 7:58 PM
Gilles moved this task from Inbox to Radar on the Performance-Team board.Jun 17 2019, 8:06 PM
Gilles edited projects, added Performance-Team (Radar); removed Performance-Team.
Krinkle triaged this task as High priority.Jun 17 2019, 8:13 PM

Change 518466 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] resourceloader: Set the request base parameters on server-side

https://gerrit.wikimedia.org/r/518466

Krinkle closed this task as Resolved.Jun 26 2019, 10:50 PM
Krinkle removed a project: Patch-For-Review.

Thanks!

Change 518466 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Set the request base parameters on server-side

https://gerrit.wikimedia.org/r/518466