Topic on Talk:ResourceLoader

Jump to navigation Jump to search

Compression on javascript requests not working

5
Dangrec (talkcontribs)

I'm using MW 1.18.1, and all requests going to MW have "Accept-Encoding gzip, deflate".
css requests loaded by the Resource Loader are compressed with "Content-Encoding: gzip", but javascript requests are not.
The following examples are the only two Resource Loader files being compressed:
http://example.org/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&*
http://example.org/load.php?debug=false&lang=en&modules=site&only=styles&skin=vector&*
Which are both text/css.

The following examples are not being compressed:
http://example.org/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector&*
http://wikioverland.org/load.php?debug=false&lang=en&modules=skins.vector&only=scripts&skin=vector&*
In all there are 7 requests to /load.php? that are not compressed, they are all text/javascript.

I have verified zlib is correctly installed in Apache. I am NOT using $wgDisableOutputCompression

Thanks, -Dangrec 00:40, 14 February 2012 (UTC)

Wikihy com (talkcontribs)

I am seeing the same thing in MW 1.21 (i found these because Google analytics page speed analysis complained about them). Any suggestions? Thanks a lot.

Wikihy com (talkcontribs)
Stefahn (talkcontribs)

Thanks a lot. This helped me too. Google complained about 5 load.php statements not being compressed (as far as I can see 4 scripts and 1 style). After setting zlib.output_compression to "On" all is compressed :)

This post was hidden by Glaisher (history)
Reply to "Compression on javascript requests not working"