Ideally we would use an API that only gives us the changes list, but for a quick and dirty solution we could at least add a parameter that returns only the changes list and none of the rest of the UI.
|Resolved||SBisson||T167743 Implement 'Live Updates' feature for RC page filters|
|Resolved||Catrope||T173614 Graduate Live Update out of beta|
|Resolved||SBisson||T173613 Make "live update" not download the entire RC page every 3 seconds|
What is being downloaded every 3 seconds is a page with
- the standard MW chrome
- the no-js RC form with show/hide toggles
- 0 or 1 recent change (because ?limit=1).
Note that contrary to a regular page load, none of the linked assets are being pulled.
By-passing #2 and #3 doesn't seem to have a noticeable effect on size and speed (tested locally with curl in a loop) but removing all of #1 might. Is there a way in MW to send a code and by-pass all the standard chrome and whatever is added to the output before or after?
This is a special skin, which is actually intended for the human-readable API pages (e.g. https://en.wikipedia.org/w/api.php?action=query&list=allpages).
However, it turns out to work here.
This does mean the output isn't using the user's normal skin. I don't think that affects anything in the actual line being extracted, but I'm not 100% sure.
I confirm: "Live update" and "View newest" are not working in betalabs. The polling URL returns 503 (works fine without peek=1)
I need to investigate why this works fine locally but not on betalabs. Maybe @Catrope has an idea?
If need be we can just remove the peek parameter before it goes live next week.
I only see a HTTP 503 in the case that should return a HTTP 304 – otherwise, I correctly get an empty page with HTTP 200. Perhaps our caching layer doesn't like the 304. Try just using a HTTP 200 always and instead returning the information in the body (e.g. a '1' or '0')?