On Sat, Aug 22, 2015 at 9:17 AM, ArtGiray . <[email protected]> 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.29.3F [3] https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Raw -- =S Page WMF Tech writer
_______________________________________________ Mediawiki-api mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
