Page MenuHomePhabricator

centralnotice.js should be served compressed and from bits.
Closed, ResolvedPublic

Description

The file http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js does not appear to be HTTP compressed by the server. Doing so would save ~1.4kb, or ~65% of its size. It would probably fit into one or two packets rather than the three that it currently occupies.


Version: unspecified
Severity: enhancement

Details

Reference
bz19437

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:38 PM
bzimport set Reference to bz19437.

Fred, do we know how to appropriately config JWS for this on ms1?

And it also should be served from bits.wikimedia.org, which became available later.

  • Bug 24530 has been marked as a duplicate of this bug. ***

Giving half of Fred's old bugs to Ashar since I trust him to get it done or reassign if he doesn't have time.

It should either be part of the extension, in which case it can be loaded from wgExtensionAssetsPath:

http://bits.wikimedia.org/w/extensions-1.17/CentralNotice/centralnotice.js

Or, if WMF specific, it could be stored locally and defined as a module in CommonSettings.php and loaded (so that it's cached and minifed, and served from bits.wikimedia.org/wiki.domain/load.php, the same way other skins and extensions styles/scripts are loaded.

The file centralnotice.js does exist in SVN but does not mach the one at:

http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js

Is the one from upload.wm.o still in use ? perhaps this has been fixed already...

Or just RL-ify CentralNotice?

(In reply to comment #7)

Or just RL-ify CentralNotice?

it would have to be part of the extension first (ie. in the extensions' directory) or an on-wiki page as script source (ie. MediaWiki:Centralnotice.js)

http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js hasn't been used in years. The entire root level centralnotice directory was deleted from trunk a long time ago. How do we remove it from upload.wikimedia.org?

There is a centralnotice.js file within the CentralNotice extension, which is served from ResourceLoader.

I'm going to go ahead and resolve this as fixed. If anyone wants to open a separate bug about deleting the old http://upload.wikimedia.org/centralnotice/ directory, that would be fine by me.

(In reply to comment #9)

http://upload.wikimedia.org/centralnotice/wikipedia/en/centralnotice.js hasn't
been used in years. The entire root level centralnotice directory was deleted
from trunk a long time ago. How do we remove it from upload.wikimedia.org?

This stuff lives in /mnt/upload6/centralnotice . If it's really not used any more, you can just shell into fenari and kill it. However, there seems to be ton of things in there, lots of different centralnotice.js files in a 2-level (wiki/language, it seems) directory structure and images here and there.

Yeah, those are all the generated javascript files for all the wikis as of the last time they were generated (probably about 2 years ago). All of that stuff is dynamic now. I imagine the images were for various banners. Now we host the images on meta and commons, which is less secure, but more practical.

Just delete all those files. We don't need them.

I've archived the contents of /mnt/upload6/centralnotice.

I can't, however, remove the directory as I do not have sufficient permissions to remove everything (many things are owned by apache and in the apache group and I don't have r00t). Roan, can you take care of that?

(In reply to comment #14)

I've archived the contents of /mnt/upload6/centralnotice.

I can't, however, remove the directory as I do not have sufficient permissions
to remove everything (many things are owned by apache and in the apache group
and I don't have r00t). Roan, can you take care of that?

I'll delete it once you're awake and on IRC, so we can restore it quickly if anything bad happens.