Hi,
I created this ticket: https://phabricator.wikimedia.org/T119878
The basic idea is that it shouldn't be a big problem to compress output of api.php script using some widely available library, like gzip.
That way the size of communication between client and server would be much smaller and users with slow internet might benefit from this. I am not sure how much the data would be reduced, but it could be a significant number in some cases.
What do you think about it? Is there any reason not to do that?
Note I don't propose some breaking change, rather just create an optional parameter "compression" that would be passed for API requests.
Also, mobile phones would probably benefit from this most, if there is some wiki-reader app that uses API for it to work.
On Mon, Nov 30, 2015 at 5:10 PM, Petr Bena benapetr@gmail.com wrote:
Hi,
I created this ticket: https://phabricator.wikimedia.org/T119878
The basic idea is that it shouldn't be a big problem to compress output of api.php script using some widely available library, like gzip.
That way the size of communication between client and server would be much smaller and users with slow internet might benefit from this. I am not sure how much the data would be reduced, but it could be a significant number in some cases.
What do you think about it? Is there any reason not to do that?
Note I don't propose some breaking change, rather just create an optional parameter "compression" that would be passed for API requests.
...if there is some wiki-reader app that uses API for it to work.
There is indeed[0], and it does! :)
[0] https://play.google.com/store/apps/details?id=org.wikipedia&hl=en
On Mon, Nov 30, 2015 at 11:11 AM, Petr Bena benapetr@gmail.com wrote:
Also, mobile phones would probably benefit from this most, if there is some wiki-reader app that uses API for it to work.
On Mon, Nov 30, 2015 at 5:10 PM, Petr Bena benapetr@gmail.com wrote:
Hi,
I created this ticket: https://phabricator.wikimedia.org/T119878
The basic idea is that it shouldn't be a big problem to compress output of api.php script using some widely available library, like gzip.
That way the size of communication between client and server would be much smaller and users with slow internet might benefit from this. I am not sure how much the data would be reduced, but it could be a significant number in some cases.
What do you think about it? Is there any reason not to do that?
Note I don't propose some breaking change, rather just create an optional parameter "compression" that would be passed for API requests.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, Nov 30, 2015 at 11:10 AM, Petr Bena benapetr@gmail.com wrote:
Is there any reason not to do that?
That the HTTP Accept-Encoding header[1] already exists?
[1]: https://tools.ietf.org/html/rfc7231#section-5.3.4
Interesting. I was googling for something like that, but for whatever reasons it just wasn't anywhere in the results...
On Mon, Nov 30, 2015 at 5:12 PM, Brad Jorsch (Anomie) bjorsch@wikimedia.org wrote:
On Mon, Nov 30, 2015 at 11:10 AM, Petr Bena benapetr@gmail.com wrote:
Is there any reason not to do that?
That the HTTP Accept-Encoding header[1] already exists?
-- Brad Jorsch (Anomie) Senior Software Engineer Wikimedia Foundation _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Le 30/11/2015 17:10, Petr Bena a écrit :
Hi,
I created this ticket: https://phabricator.wikimedia.org/T119878
The basic idea is that it shouldn't be a big problem to compress output of api.php script using some widely available library, like gzip.
That way the size of communication between client and server would be much smaller and users with slow internet might benefit from this. I am not sure how much the data would be reduced, but it could be a significant number in some cases.
What do you think about it? Is there any reason not to do that?
Note I don't propose some breaking change, rather just create an optional parameter "compression" that would be passed for API requests.
Hello,
That is supported by http clients/servers by sending a header.
curl --verbose https://www.mediawiki.org/w/api.php >/dev/null
Accept: */*
23kbytes payload
curl --compressed --verbose https://www.mediawiki.org/w/api.php >/dev/null
Accept: */* Accept-Encoding: deflate, gzip
6kbytes payload
So just pass: 'Accept-Encoding: gzip', and you should be served gziped content by Mediawiki.
wikitech-l@lists.wikimedia.org