GET page/mobile-html/{title}/{revision}

unknown:wikipedia-rest-api

Summary: Get page content HTML optimized for mobile consumption.
Operation ID: getContentWithRevision-mobile-html
Auth: unknown
Description

Gets the content HTML optimized for mobile consumption for the given page. This content is derived from Parsoid HTML (see `/page/html/{title}` endpoint). The difference to Parsoid HTML is roughly: * Some elements and attributes not needed for the reading case are removed. * LeadIntroductionTransform: The introductory paragraph is moved before an infobox. * RedLinks: Red links are flattened (=turned into span elements). * WidenImage: images that should be displayed in gallery are widened. * Section headings are slightly changed by wrapping the headings inside a div and adding a span element inside the new div for the edit buttons. * Additional classes are added to img elements to fix issues with non-white backgrounds. See Theme support below for instructions on how to enable that. * Pagelib CSS files needed to display the content are referenced. * LazyLoadTransform: server-side portion/prep for lazy loading of images. * CollapseTable: server-side portion/prep for collapsing tables. What's not included? What parts of the PageLibrary does a client still have to do? * Theme support: Themes can be turned on by adding a theme class to the root <html> tag. Possible class names are: * `pagelib_theme_default` * `pagelib_theme_dark` * `pagelib_theme_black` * `pagelib_theme_sepia` The pagelib JS has functionality to do that: ThemeTransform.setTheme(document, theme). * Dim images: DimImagesTransform.dim(window, enable) * PlatformTransform.classify(window) to trigger Android and iOS app specific CSS rules * LazyLoadTransformer: client side companion of LazyLoadTransform (note the extra *er* here) * FooterTransformer: seems to be more UI than content, requires I18N, too Stability: [experimental](https://www.mediawiki.org/wiki/API_versioning#Experimental)

Parameters (3)

redirect (boolean, query, optional)

Requests for [redirect pages](https://www.mediawiki.org/wiki/Help:Redirects) return HTTP 302 with a redirect target in `Location` header and content in the body. To get a 200 response instead, supply `false` to the `redirect` parameter.

revision (integer, path, required)

Optional page revision. Note that older revisions are not stored, so request latency with the revision would be higher.

title (string, path, required)

Page title. Use underscores instead of spaces. Use percent-encoding. Example: `Main_Page`.

No probe data for this endpoint yet.