The styles and messages delivered by load.php contains unnecessary escaped characters like \u003E instead of >. Escaping of <, > and & is not needed here and is a waste of traffic.
Examples:
The styles and messages delivered by load.php contains unnecessary escaped characters like \u003E instead of >. Escaping of <, > and & is not needed here and is a waste of traffic.
Examples:
Change 526385 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] ResourceLoader: Avoid escaping of characters in styles
Change 535266 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] [WIP] resourceloader: Move encodeJsonForScript to ResourceLoaderContext
Change 535266 merged by jenkins-bot:
[mediawiki/core@master] resourceloader: Add $context to static functions in ResourceLoader
Change 526385 abandoned by Krinkle:
[mediawiki/core@master] resourceloader: Avoid HTML encoding in output of load.php
Reason:
I'm declining this for sake of simplicitly. The optimisation is imho not worth the complexity and security risk, and I rather like the idea that we are "just" sending load.php responses into <script> tags, essentially following the preload / "Facebook BigPipe" idea. Separating the two would require every possible byte that might make its way into the response to be split and injected and made aware of this which I think is too big of a gamble and limitation to enforce on the whole stack.