What is the difference of this two queries?
https://en.wikipedia.org/wiki/Car?action=raw https://en.wikipedia.org/w/index.php?title=Car&action=raw
(i used first one before, then use second, but sometimes it's not response...)
are any of these queries doing extra processing on server side ?
which one i should use for more speed on my wikibot? (or any different query suggestion?)
On Sat, Aug 22, 2015 at 9:17 AM, ArtGiray . giraybal@gmail.com wrote:
What is the difference of this two queries?
https://en.wikipedia.org/wiki/Car?action=raw https://en.wikipedia.org/w/index.php?title=Car&action=raw
They're almost the same, they wind up routing to the same includes/actions/ code. Clients may treat the two requests differently because a request to index.php request has an inferred "PHP" content-type, but for a bot it shouldn't matter. (There is an RFC to switch WMF sites to the former style of action URL [1], but both will continue to work.)
When I use `curl --dump-header -` with them they produce identical HTML, but the HTTP headers are different, the first outputs a Transfer-Encoding: chunked and the latter Content-Length: 58015 These are probably artifacts of the Varnish caching that WMF sites use, but it's interesting.
(i used first one before, then use second, but sometimes it's not
response...)
I've never heard of that, but the first time I tried the index.php request using curl after about 20 seconds the connection closed with no response! Is that what you experienced? You or I should file a bug.
are any of these queries doing extra processing on server side ?
I believe not when it gets to a PHP server, but something in WMF's complex configuration is treating them differently.
which one i should use for more speed on my wikibot?
I don't know, sorry.
(or any different query suggestion?)
Read [2] and [3]. Depending on what you want to do with wikitext there are other APIs.
[1] https://www.mediawiki.org/wiki/Requests_for_comment/Clean_up_URLs [2] https://www.mediawiki.org/wiki/API:FAQ#get_the_content_of_a_page_.28wikitext... [3] https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Raw
Il 22/08/2015 18:17, ArtGiray . ha scritto:
What is the difference of this two queries?
https://en.wikipedia.org/wiki/Car?action=raw https://en.wikipedia.org/w/index.php?title=Car&action=raw
For example, the former doesn't work for titles containing a dot: https://en.wikipedia.org/wiki/MediaWiki:Common.js?action=raw https://en.wikipedia.org/w/index.php?title=MediaWiki:Common.js&action=ra...
(i used first one before, then use second, but sometimes it's not response...)
are any of these queries doing extra processing on server side ?
which one i should use for more speed on my wikibot? (or any different query suggestion?)
For bots I recommend the revisions API https://en.wikipedia.org/w/api.php?action=help&modules=query%2Brevisions.
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
mediawiki-api@lists.wikimedia.org