Page MenuHomePhabricator

[Spike] Make languages available to index crawlers in mobile version of article pages
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Description

Its emerged that including language links in the page HTML is useful for SEO purposes.
The reason a change is required on our side is that Google is transitioning to a mobile first indexing crawler. While the desktop site will still be crawled, mobile will be the default. While our mobile pages include a canonical URL to the desktop site, the mobile site will still be the primary source.

Currently on mobile language links are hidden inside an overlay, so to respond to this we'll need to add markup in the mobile site, to allow discovery of these pages. For that there are two options:

  1. Using link[hreflang] tags (Google's preferred and recommended solution)
  2. Include a[hreflang] tags in the page. Google has confirmed that even though the a[hreflang] elements we use in desktop are non-standard, they work and will be crawled if present.

We clarified that it is enough for the mobile site to link to desktop URLs.

That leaves us with 2 options to consider

Solutions we are considering

Option 1 - We change mobile HTML

This does not impact the first 14kB of HTML guideline from the performance team so should not have any negative effect on page load. However, since this is non-standard there is no guarantee this will work for all search engines and will work in future.

Patch: https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/879607.

Option 2 - We change both mobile and desktop HTML to include the language links in the HEAD.

This is likely ill-advised by the performance team given their guidelines around the first 14kB of HTML but perhaps this is a special case (it's not clear from the text if this is a non-starter or open to compromise) - The guidelines from the performance team specifically warn against this under "Reduce amount of per-page header bloat" and for well developed articles this could be considerable. Web team will do some analysis to identify what the average number of languages is for an article, and also look at the top 100 articles to get a sense for the average HTML bloat this would add and whether this would clash with the 14kb guidelines.

Patch: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/891874

TODO

  • Identify how many language links exist on the most read Wikipedia page's (use the top 100 for a given day to get a rough sense of this value)
  • Quantify the impacts on page HTML payload for options 1 and 2
  • Quantify the impacts on the first 14kb of HTML payload for options 1 and 2
  • Run synthetic tests on 1 and 2 to identify impact on first paint and other key metrics (if any)
  • Once we've done the above analysis we plan to summarize and put forward a recommendation about what to do here. Identify the tradeoffs to consider based on performance measures.
  • Inform the performance team (performance-team@wikimedia.org) of our decision

Proposal notes

Option 1

  • Add languages to the footer of the page and hide them by default
  • Change links to languages to point to the new fragment identifier
  • When the fragment identifier is the target using the :target selector display it

option 2

  • Check there are link tags in the HEAD of the article

Sign off steps

  • If needed, create a ticket for updating MobileFrontend to avoid use of Special:MobileLanguages, and avoid API request for languages given they are now in the page.
  • Decline T104660 pointing to this ticket and SEO recommendation around best practice here if necessary

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I've mocked up what we'd be proposing here. Given some pages have a lot of languages, this can add bytes to the HTML (the Barcelona article on English Wikipedia for example before gzip would jump from 747kb to 795kb). We'd be putting it below the fold and hiding it by default unless the hash fragment reveals it via :target selector so we don't think this will impact first paint. We wanted to quickly check in with the performance team if there's anything we're forgetting off the top of our head before doing that.

@Func no that wouldn't help that ticket - we're not changing anything about the default experience here and the language overlay would continue to work exactly as it currently does. T302200 will require changes in Extension:Translate .

T302200 will require changes in Extension:Translate .

No, it isn't. I already have a patch on MobileFrontend which works for me, and pending review as you mentioned in T302200#8334550.

T302200 will require changes in Extension:Translate .

No, it isn't. I already have a patch on MobileFrontend which works for me, and pending review as you mentioned in T302200#8334550.

I can take a look. It wasn't added to my attention for some reason so wasn't on my radar. Will look this week.

Hey @Jdlrobson, What's the SEO benefit of this?
Is there any room for improvement on the 48kb that we are adding? It seems to be about 7kb for desktop on the same article :)

Hey @larissagaulia, chiming in on the SEO portion of your question. The Google team flagged this as a major issue because as it stands now users' language preferences are being overridden and they're often being served content in the largest local language Wikipedia instead of their preferred language (e.g. Spanish instead of Catalan).

This has also caused some negative press because it is creating the impression for some people that search engines are deliberately suppressing smaller language Wikipedias and content. There are an increasing number of articles and tweets about this, but Google has so far refrained from mentioning Wikipedia specifically in their response since they know we're trying to find a solution.

Hey @larissagaulia My values are before gzip. After gzip it will be around 8kb added which is consistent with desktop (presuming your 7kb relates to desktop).

@ovasileva do you reckon we could squeeze this into sprint 3?

Yeah, that sounds good to me

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/4152186d05/w

LGoto set the point value for this task to 3.

Provisional estimate was based on the current approach to insert the languages at the bottom of the page and only reveal them when the hash fragment is present.
We're a little concerned that these links would be hidden by default - we need to check whether hiding languages would be problematic for SEO.
We may also want to consider other approaches here - such as a dropdown at the top of the page like we do on desktop Vector 2022 on a section heading with content.

Hi everyone -
I wanted to add a bit of context here in case it's helpful. @Jdlrobson 's current patch is tentative. He crafted it based on some initial back and forth with the Partnerships team and Google, but for a handful of reasons, we're not sure this is the best approach, and we'd like some help in better understanding alternatives, as well as potential fallout.

We wanted to reach out to Performance-Team specifically with the intent of benefitting from your knowledge and expertise as subject-matter experts in the area of performance and its interactions with this kind of change.

Would you all be able to write out any concerns you may have with this approach from the perspective of potential performance-related fallout, and/or provide any thoughts you may have as to specific alternative implementations to accomplish the same end-state?

We'd also like to reach out to Google and ask questions around the potential solution and if it would work for them and other search engines, as well as to make an internal investigation in potential effects on SEO. But - Before we do this, it would be helpful if we could devise a specific list of questions that take the performance perspective into account as well, so as to make that back and forth more productive. When you provide your feedback, can you call out questions you may have that would be helpful for the Partnerships team to clarify directly?

Recapping, if possible we'd like help from you all in defining:

  1. What performance-related issues do you see with the current patch? Are there other ways we could accomplish the same ends through different means?
  2. What open questions do we have for Partnerships to relay that would help us in crafting a solution to this problem?

If we can discuss and align on these initially async within this ticket, we can then take these to Partnerships. Our hope is that this will be helpful in the name of making progress towards a sustainable, longer-term solution that is acceptable from the POV of Web, Performance, and Partnerships.

In T326829#8586480, @NHillard-WMF wrote:

Hi everyone -
I wanted to add a bit of context here in case it's helpful. @Jdlrobson 's current patch is tentative. He crafted it based on some initial back and forth with the Partnerships team and Google, but for a handful of reasons, we're not sure this is the best approach, and we'd like some help in better understanding alternatives, as well as potential fallout.

We wanted to reach out to Performance-Team specifically with the intent of benefitting from your knowledge and expertise as subject-matter experts in the area of performance and its interactions with this kind of change.

Would you all be able to write out any concerns you may have with this approach from the perspective of potential performance-related fallout, and/or provide any thoughts you may have as to specific alternative implementations to accomplish the same end-state?

We'd also like to reach out to Google and ask questions around the potential solution and if it would work for them and other search engines, as well as to make an internal investigation in potential effects on SEO. But - Before we do this, it would be helpful if we could devise a specific list of questions that take the performance perspective into account as well, so as to make that back and forth more productive. When you provide your feedback, can you call out questions you may have that would be helpful for the Partnerships team to clarify directly?

Recapping, if possible we'd like help from you all in defining:

  1. What performance-related issues do you see with the current patch? Are there other ways we could accomplish the same ends through different means?
  2. What open questions do we have for Partnerships to relay that would help us in crafting a solution to this problem?

If we can discuss and align on these initially async within this ticket, we can then take these to Partnerships. Our hope is that this will be helpful in the name of making progress towards a sustainable, longer-term solution that is acceptable from the POV of Web, Performance, and Partnerships.

  1. As previously discussed, our end goal here would be to switch from "here's the approach, could you tell us if it's good enough?" towards "The root cause of the bug is A, we considered approaches B and C following the frontend guidelines and backend guidelines, these are the set of tradeoffs and these are the metrics we used". This is aligned with the feedback received that the performance team has been a blocker, so we'd like to empower you to make architectural decisions aligned with the principles we usually follow. This can be achieved by asking concrete questions or clarifications the guidelines.
  1. the specific question we have for Google: Google uses our recent change EventStreams to be aware of edited pages in real-time. Unlike for general sites, they don't passively crawl the whole site to see where things have changed. They respond to those events by crawling. The question is how. It'd be good to know if there's anything we can do to make it possible for them to correlate/merge the metadata they get, instead of requiring the mobile site to output the same metadata that they already crawl from REST API and desktop site. We suspect they used to be able to merge this and we or they may have, inadvertently, done something to break that. And if not, it'd be great to do so. It would benefit lots of websites (And Google).

    TLDR: The 2 questions are:
  • how does Google react to the EventStreams change?
  • Google used to be able to know that the mobile version had the same content as the canonical version. What changed that broke it and started indexing those as separate logical pages?

As previously discussed, our end goal here would be to switch from "here's the approach, could you tell us if it's good enough?" towards "The root cause of the bug is A, we considered approaches B and C following the frontend guidelines and backend guidelines, these are the set of tradeoffs and these are the metrics we used". This is aligned with the feedback received that the performance team has been a blocker, so we'd like to empower you to make architectural decisions aligned with the principles we usually follow. This can be achieved by asking concrete questions or clarifications the guidelines.

Sharing from our email chain (with a few redactions) we discussed 3 possible options:

On the desktop site, language links are in the page HTML directly.  On mobile however, site language links (and associated href tags) are inside an overlay, and are loaded via an API.  <redacted>

It seems we have a few different options:
1. <redacted> crawl the language overlay or hit the API directly for this information.
2. We can add languages to the mobile site.  Adding languages to mobile site would increase the HTML payload size by 50kb. We would need to collaborate with the performance team on implications of that (although it's not a severe increase).
3. We can add languages as meta tags in the header (as per <redacted> suggestion).  This option is actually sub-optimal for us as it would require adding them to both the mobile and desktop site, leading to duplication of the language links on desktop.

My understanding from our exchange so far, is that 1 was not an option (although I'm not sure why). It seems we are seeking further clarity on #1 at this point.

Out of the remaining options in both cases these would lead to a small increase in HTML payload for the site (As mentioned earlier for pages with lots of languages around 50kb before gzip or 7kb without).

Option 3: Adding meta tags to the header would require changing both desktop and mobile experiences and would lead to unnecessary HTML bloat in the desktop experience. From a maintenance point of view, web team would rather not maintain a mobile-only solution and we'd prefer to keep to the simplest solution (same for both sites).

Option 2: Is tempting from a technical and product perspective, as on the long term it would remove an HTTP request and MediaWiki API lookup on the mobile site for showing languages to users meaning the language overlay would be perceived as more responsive on the frontend (no need for a ajax spinner). It would also solve a longstanding piece of technical debt which is the Special:MobileLanguages page (T104660).

Both option 2 and 3 are likely similar in terms of trade offs, and presumably can be tested using the same synthetic testing approach we've applied to the recent fixed width toggle. My hypothesis is neither is going to make much difference to overall site performance, but of course we should prove that (and likely contrast the two).

Talked about this in sprint planning today and given team absences we're unlikely to be able to commit to implementation in the next 2 weeks but we're hoping it will be ready to start on around the 27th

Change 891919 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] [POC] Add alternative links to HEAD for language links

https://gerrit.wikimedia.org/r/891919

Jdlrobson renamed this task from Change Minerva languages fallback to operate within page to Make languages available to index crawlers in mobile version of article pages.Feb 24 2023, 10:08 PM
Jdlrobson updated the task description. (Show Details)

I've updated this ticket following our conversation with Google. Hopefully this clarifies why we need to do this.

I've also generalized this as we are still considering 2 possible solutions here. I've outlined in the description TODO steps on the approach we plan to take to decide which of those solutions is preferable. @NHillard-WMF please let me know if I've not covered anything.

Jdlrobson updated the task description. (Show Details)
LGoto changed the point value for this task from 3 to 5.

Change 891874 had a related patch set uploaded (by Jdlrobson; author: Winston Sung):

[mediawiki/core@master] Add interlanguage links to alternate URLs

https://gerrit.wikimedia.org/r/891874

Change 891919 abandoned by Jdlrobson:

[mediawiki/core@master] [POC] Add alternative links to HEAD for language links

Reason:

Merged into https://gerrit.wikimedia.org/r/c/mediawiki/core/+/891874

https://gerrit.wikimedia.org/r/891919

Can likely use https://github.com/nicholasray/srcset to check the 14kb rule to determine whether the meta tag would exceed the budget. @nray is going to investigate if there is any advantage to putting languages in the meta tag.

Investigate if there is any advantage to putting languages in the meta tag.

I believe there are advantages and benefits to add language alternate URLs.

For example, all main pages on Fandom have a simple implement for it.

I also asked the Director of SEO of Fandom:

2023-01-27T17:39Z, in Fandom/Gamepedia Official Discord server, Director of SEO wrote:

href lang is something I very much want to do - and we already have it for main pages

Sorry that should read "putting languages in the meta tag for Wikimedia sites". One thing that's problematic with Wikimedia doing this is that for some pages that would be 200+ link tags which has trade offs with performance per https://wikitech.wikimedia.org/wiki/Performance/Guides/Frontend_performance_practices#Size_of_HTML_payload . Clearly there are advantages to including the meta tags for non-Wikimedia sites :-).

Oh yeah, that would be a problem if there are 200+ link tags.

Looking at the top 100 articles for the month of January, the median number of language links is 37 and the average is 52. At the extreme side, there were 304 language links.
Average language links per page=52.83, Max = 304, Min = 0, Median = 37

Change 893542 had a related patch set uploaded (by Nray; author: Nray):

[operations/mediawiki-config@master] Replace Cleopatra page with United_States to facilitate synthetic testing of T326829

https://gerrit.wikimedia.org/r/893542

Change 896069 had a related patch set uploaded (by Phedenskog; author: Phedenskog):

[performance/mobile-synthetic-monitoring-tests@master] Add tests to test out Nicholas index crawler tests.

https://gerrit.wikimedia.org/r/896069

I believe there are advantages and benefits to add language alternate URLs.

I also asked the Director of SEO of Fandom:

2023-01-27T17:39Z, in Fandom/Gamepedia Official Discord server, Director of SEO wrote:

href lang is something I very much want to do - and we already have it for main pages

Note that most skins (notable exception Minerva today) already output interlanguage in their sidebar with <a hreflang> markup, which Google understands and interprets the same as <link> tags. The choice between them is generally one of whether a given website wants to / has invested in its own UI and/or may for technical reason (if they are not so many) even do both.

Another example of this kind of semantic HTML is the XFN rel="me" link. This has recently risen in popularity because Mastodon uses this standard to powers its verified website (docs). Similarly, you can choose whether to place this on a visible link and/or to have it as <link> metadata only.

Based on https://community.fandom.com/wiki/Help:Interlanguage_link and the linked example of https://tardis.fandom.com/wiki/Alistair_Gordon_Lethbridge-Stewart. I believe it's about the links in the "Languages" section at the bottom of the page? The fandomdesktop skin does not yet add rel/hreflang attributes to its inter language links, but it totally could!

Change 893542 merged by jenkins-bot:

[operations/mediawiki-config@master] Replace Cleopatra page with United_States to facilitate synthetic testing of T326829

https://gerrit.wikimedia.org/r/893542

Mentioned in SAL (#wikimedia-operations) [2023-03-09T21:27:09Z] <samtar@deploy2002> Started scap: Backport for [[gerrit:893542|Replace Cleopatra page with United_States to facilitate synthetic testing of T326829 (T326829)]]

Mentioned in SAL (#wikimedia-operations) [2023-03-09T21:28:45Z] <samtar@deploy2002> samtar and nray: Backport for [[gerrit:893542|Replace Cleopatra page with United_States to facilitate synthetic testing of T326829 (T326829)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-03-09T21:37:53Z] <samtar@deploy2002> Finished scap: Backport for [[gerrit:893542|Replace Cleopatra page with United_States to facilitate synthetic testing of T326829 (T326829)]] (duration: 10m 43s)

Note that most skins (notable exception Minerva today) already output interlanguage in their sidebar with <a hreflang> markup, which Google understands and interprets the same as <link> tags.

Thanks for the information!

Change 896069 merged by jenkins-bot:

[performance/mobile-synthetic-monitoring-tests@master] Add tests to test out Nicholas index crawler tests.

https://gerrit.wikimedia.org/r/896069

Note that most skins (notable exception Minerva today) already output interlanguage in their sidebar with <a hreflang> markup, which Google understands and interprets the same as <link> tags. The choice between them is generally one of whether a given website wants to / has invested in its own UI and/or may for technical reason (if they are not so many) even do both.

While this seems to hold true it doesn't quite make sense to me. From the spec "The hreflang attribute on a elements that create hyperlinks, if present, gives the language of the linked resource. It is purely advisory. The value must be a valid BCP 47 language tag. [BCP47]" My understanding from the spec is that it would be acceptable for example to point to a reference in another language that was not an alternate language of the page e.g. The English Wikipedia article on Paella could say "Paella contains snails [1]" where [1] links to a Spanish recipe site e.g. <a hreflang="es" href="https://recipes.es/.."></a>. I'm not sure how Google differentiates between such links if at all. The link tag is pretty unambiguous on the other hand in that it makes clear via rel="alternate" that it is an alternate version.

I think for completeness, perhaps our language links should add rel="alternate" ?

@Jdlrobson and I used a script to roughly measure the effect that adding languages to the mobile pages has on the html payload for the most popular pages in the month of February 2023.

The script performed the following steps:

  • Downloaded the top 100 most popular pages for the month of February 2023
  • For each page, it saved a "before" and "after" version. The "before" version contained the untouched html from the production mobile site. The "after" version used the exact same HTML but added the language links in the body (in the form of a tags with a hreflang attribute) or the head (in the form of link tags with a hreflang attribute).
  • Recorded the sizes of:
    • uncompressed html size from the <!DOCTYPE> to the end of the first paragraph (see T231168 and performance guidelines (labeled in tables as "html size paragraph")
    • compressed html size from the <!DOCTYPE> to the end of the first paragraph (using gzip) (see T231168, and performance guidelines (labeled in tables as "html transfer size paragraph")
    • the uncompressed html size (labeled in tables as "html size")
    • compressed html size (using gzip and labeled in tables as "html transfer size")

Head

Out of the top 100 most popular pages for the month of February 2023:

  • All but two pages ("United States" and "2022_Russian_invasion_of_Ukraine") were underneath the 14 kB transfer budget
  • The added HTML size compresses well with the largest difference being 7.42 kB ("United States") of added HTML transfer (median: 895 B), but 42.36 kB of uncompressed HTML (median: 5.08 kB) . It will be interesting to see the effect this has on HTML parse time and paint metrics from the synthetic tests of the "United States" page.
Median diff html size paragraphMax diff html size paragraphMedian diff html transfer size paragraphMax diff html transfer size paragraphMedian diff html sizeMax diff html sizeMedian diff html transfer sizeMax diff html transfer size
:------------------------------:---------------------------:---------------------------------------:------------------------------------:--------------------:-----------------:-----------------------------:--------------------------
5.08 kB42.36 kB900 B7.61 kB5.08 kB42.36 kB895 B7.42 kB
PageBefore html size paragraphAfter html size paragraphDiff html size paragraphBefore html transfer size paragraphAfter html transfer size paragraphDiff html transfer size paragraphBefore html sizeAfter html sizeDiff html sizeBefore html transfer sizeAfter html transfer sizeDiff html transfer size
:------------------------------------:-------------------------:------------------------:-----------------------:----------------------------------:---------------------------------:--------------------------------:---------------:--------------:-------------:------------------------:-----------------------:----------------------
Jake_Paul_vs_Tommy_Fury21.75 kB21.75 kB0 B7.08 kB7.08 kB0 B91.07 kB91.07 kB0 B18.5 kB18.5 kB0 B
Murdaugh_family21.48 kB21.68 kB192 B7.24 kB7.3 kB63 B268.43 kB268.62 kB192 B52.26 kB52.33 kB65 B
You_(season_4)22.32 kB22.53 kB209 B7.37 kB7.44 kB70 B103.62 kB103.83 kB209 B24.43 kB24.5 kB71 B
Tommy_Fury22.33 kB22.74 kB407 B7.39 kB7.47 kB83 B92.65 kB93.05 kB407 B21.56 kB21.64 kB81 B
Brink's-Mat_robbery20.95 kB21.24 kB295 B7.09 kB7.19 kB100 B173.36 kB173.65 kB295 B35 kB35.1 kB95 B
Lux_Pascal21.11 kB21.57 kB456 B7.03 kB7.12 kB96 B63.23 kB63.68 kB456 B16.77 kB16.86 kB100 B
Bigg_Boss_(Hindi_season_16)21.71 kB22.37 kB652 B7.18 kB7.34 kB157 B326.06 kB326.71 kB652 B57.3 kB57.45 kB153 B
Elimination_Chamber_(2023)22.54 kB23.46 kB918 B7.34 kB7.52 kB172 B163.48 kB164.4 kB918 B34.59 kB34.76 kB168 B
Jason_Kelce22.55 kB23.51 kB960 B7.4 kB7.58 kB185 B138.23 kB139.19 kB960 B30.86 kB31.04 kB180 B
Shehzada_(2023_film)22.09 kB22.84 kB756 B7.29 kB7.48 kB186 B117.76 kB118.51 kB756 B26.78 kB26.97 kB187 B
Varisu22.12 kB22.86 kB744 B7.38 kB7.59 kB203 B280.63 kB281.37 kB744 B49.27 kB49.47 kB198 B
XXXX20.92 kB21.95 kB1.03 kB6.98 kB7.18 kB199 B36.01 kB37.04 kB1.03 kB11.06 kB11.26 kB200 B
Jalen_Hurts22.77 kB23.79 kB1.02 kB7.47 kB7.7 kB226 B194.33 kB195.35 kB1.02 kB38.53 kB38.74 kB212 B
Mac_McClung22.5 kB23.6 kB1.11 kB7.34 kB7.55 kB210 B156.72 kB157.82 kB1.11 kB32.02 kB32.24 kB217 B
Travis_Kelce22.3 kB23.52 kB1.22 kB7.33 kB7.56 kB228 B327.67 kB328.89 kB1.22 kB51.89 kB52.11 kB224 B
Andy_Reid23.36 kB24.51 kB1.16 kB7.53 kB7.78 kB251 B285.49 kB286.64 kB1.16 kB50.04 kB50.29 kB251 B
P._K._Rosy21.01 kB22.26 kB1.25 kB6.89 kB7.19 kB303 B59.45 kB60.7 kB1.25 kB15.84 kB16.14 kB306 B
Super_Bowl_LVII23.17 kB25.04 kB1.87 kB7.52 kB7.85 kB322 B326.51 kB328.39 kB1.87 kB62.78 kB63.1 kB318 B
Jessica_Watson22.97 kB25.06 kB2.09 kB7.51 kB7.88 kB363 B204.62 kB206.71 kB2.09 kB41.85 kB42.2 kB348 B
Pathaan_(film)21.79 kB23.83 kB2.04 kB7.29 kB7.71 kB417 B323.02 kB325.06 kB2.04 kB51.17 kB51.55 kB383 B
XXX_(film_series)21.43 kB22.92 kB1.48 kB7.07 kB7.46 kB387 B118.35 kB119.84 kB1.48 kB25.88 kB26.27 kB395 B
List_of_Super_Bowl_champions21.78 kB23.36 kB1.58 kB7.13 kB7.53 kB402 B357.95 kB359.53 kB1.58 kB51.57 kB51.97 kB403 B
Richard_Belzer21.6 kB24.05 kB2.45 kB7.11 kB7.52 kB416 B142.71 kB145.16 kB2.45 kB32.99 kB33.4 kB405 B
Omegle20.72 kB23.61 kB2.89 kB7.01 kB7.4 kB397 B59.38 kB62.27 kB2.89 kB16.43 kB16.83 kB406 B
Tommy_Lee21.82 kB24.68 kB2.85 kB7.16 kB7.59 kB424 B154.87 kB157.72 kB2.85 kB34.75 kB35.17 kB417 B
List_of_Super_Bowl_halftime_shows20.41 kB22.02 kB1.61 kB6.75 kB7.23 kB482 B281.58 kB283.19 kB1.61 kB52.54 kB53 kB462 B
Pakistan_Super_League21.4 kB23.59 kB2.19 kB7.05 kB7.54 kB488 B175.94 kB178.13 kB2.19 kB34.91 kB35.38 kB470 B
Patrick_Mahomes22.71 kB25.61 kB2.91 kB7.43 kB7.92 kB490 B447.49 kB450.4 kB2.91 kB75.84 kB76.32 kB479 B
Hogwarts_Legacy21.62 kB24.68 kB3.06 kB7.17 kB7.69 kB513 B362.83 kB365.89 kB3.06 kB59.47 kB60 kB524 B
Bella_Ramsey22.4 kB25.48 kB3.08 kB7.3 kB7.85 kB543 B145.83 kB148.91 kB3.08 kB28.79 kB29.32 kB537 B
Annie_Wersching21.38 kB24.63 kB3.25 kB6.98 kB7.52 kB547 B84.81 kB88.06 kB3.25 kB19.76 kB20.3 kB539 B
Kim_Petras21.28 kB24.61 kB3.33 kB7.11 kB7.68 kB566 B203.14 kB206.47 kB3.33 kB41.11 kB41.66 kB551 B
Jake_Paul22.05 kB25.24 kB3.19 kB7.27 kB7.81 kB548 B318.88 kB322.07 kB3.19 kB63.58 kB64.14 kB556 B
Cocaine_Bear22.15 kB24.9 kB2.75 kB7.32 kB7.91 kB595 B128.13 kB130.87 kB2.75 kB28.48 kB29.07 kB584 B
Natasha_Lyonne22.71 kB26.6 kB3.9 kB7.5 kB8.13 kB622 B199.4 kB203.29 kB3.9 kB40.49 kB41.09 kB595 B
ASAP_Rocky22.61 kB26.76 kB4.15 kB7.61 kB8.22 kB616 B355.23 kB359.38 kB4.15 kB64.53 kB65.15 kB620 B
The_Whale_(2022_film)21.43 kB24.68 kB3.26 kB7.07 kB7.75 kB673 B245.19 kB248.44 kB3.26 kB43.24 kB43.9 kB651 B
Christian_Atsu20.87 kB25.26 kB4.4 kB6.84 kB7.56 kB723 B226.87 kB231.27 kB4.4 kB39.81 kB40.51 kB696 B
Burt_Bacharach22.32 kB27.03 kB4.71 kB7.41 kB8.13 kB714 B355.55 kB360.26 kB4.71 kB69.71 kB70.41 kB698 B
XXX_(2002_film)21.74 kB25.13 kB3.39 kB7.29 kB7.97 kB688 B93.42 kB96.81 kB3.39 kB25.16 kB25.86 kB702 B
Knock_at_the_Cabin21.77 kB24.75 kB2.98 kB7.24 kB7.99 kB754 B116.85 kB119.84 kB2.98 kB26.22 kB26.97 kB747 B
Tom_Brady21.57 kB26.16 kB4.58 kB7.2 kB7.97 kB776 B1.12 MB1.13 MB4.58 kB179.15 kB179.93 kB773 B
The_Last_of_Us22.26 kB27.34 kB5.08 kB7.33 kB8.11 kB779 B517.38 kB522.47 kB5.08 kB84.32 kB85.1 kB777 B
The_Banshees_of_Inisherin21.89 kB25.91 kB4.02 kB7.17 kB7.98 kB806 B182.9 kB186.92 kB4.02 kB37.51 kB38.3 kB785 B
XXXTentacion21.85 kB28.07 kB6.22 kB7.31 kB8.11 kB798 B723.42 kB729.64 kB6.22 kB127.39 kB128.19 kB804 B
Ansel_Adams21.23 kB26.7 kB5.47 kB7.02 kB7.82 kB803 B372.55 kB378.02 kB5.47 kB72.95 kB73.76 kB809 B
Pedro_Pascal22.59 kB27.89 kB5.29 kB7.49 kB8.37 kB879 B183.96 kB189.25 kB5.29 kB36.4 kB37.24 kB841 B
Kiara_Advani21.24 kB26.32 kB5.09 kB7.13 kB8.03 kB897 B264.03 kB269.12 kB5.09 kB46.37 kB47.24 kB871 B
Andrew_Tate19.98 kB25.35 kB5.37 kB6.59 kB7.47 kB874 B324.02 kB329.39 kB5.37 kB58.28 kB59.16 kB886 B
Sam_Smith20.84 kB27.08 kB6.24 kB6.97 kB7.9 kB928 B245.88 kB252.12 kB6.24 kB49.93 kB50.83 kB893 B
XXX:_State_of_the_Union21.2 kB25.11 kB3.91 kB6.97 kB7.88 kB903 B78.29 kB82.19 kB3.91 kB20.39 kB21.29 kB896 B
You_(TV_series)20.99 kB25.15 kB4.16 kB6.87 kB7.79 kB913 B442.15 kB446.32 kB4.16 kB76.38 kB77.28 kB901 B
2023_Ohio_train_derailment22.98 kB26.55 kB3.57 kB7.56 kB8.44 kB885 B313.55 kB317.12 kB3.57 kB59.32 kB60.23 kB910 B
Super_Bowl21.93 kB28.01 kB6.08 kB7.2 kB8.16 kB964 B379.83 kB385.91 kB6.08 kB77.47 kB78.4 kB925 B
Raquel_Welch19.68 kB25.92 kB6.24 kB6.53 kB7.44 kB915 B326.78 kB333.02 kB6.24 kB65.05 kB65.98 kB929 B
Disappearance_of_Madeleine_McCann21.74 kB25.86 kB4.12 kB7.22 kB8.15 kB930 B497.65 kB501.76 kB4.12 kB104.42 kB105.39 kB965 B
Jenna_Ortega20.78 kB26.72 kB5.94 kB6.93 kB7.95 kB1.02 kB320.24 kB326.18 kB5.94 kB57.59 kB58.59 kB1 kB
ChatGPT19.78 kB26.92 kB7.14 kB6.54 kB7.56 kB1.02 kB277.34 kB284.48 kB7.14 kB56.14 kB57.15 kB1.01 kB
Nikki_Haley20.65 kB27.13 kB6.48 kB6.73 kB7.77 kB1.04 kB490.86 kB497.34 kB6.48 kB91.67 kB92.72 kB1.04 kB
Deaths_in_202319.1 kB23.57 kB4.46 kB6.45 kB7.55 kB1.11 kB159.35 kB163.81 kB4.46 kB41.41 kB42.47 kB1.05 kB
Sidharth_Malhotra20.95 kB27.23 kB6.28 kB6.98 kB8.07 kB1.09 kB171.69 kB177.97 kB6.28 kB34.44 kB35.5 kB1.07 kB
Harry_Styles20.44 kB27.91 kB7.46 kB6.8 kB7.98 kB1.18 kB615.29 kB622.75 kB7.46 kB107.8 kB108.94 kB1.14 kB
List_of_highest-grossing_Indian_films20.77 kB25.54 kB4.77 kB6.89 kB8.09 kB1.2 kB792.74 kB797.51 kB4.77 kB116.68 kB117.85 kB1.17 kB
XXX:_Return_of_Xander_Cage21.75 kB27.04 kB5.29 kB7.18 kB8.39 kB1.21 kB162.47 kB167.76 kB5.29 kB35.15 kB36.35 kB1.19 kB
Ashton_Kutcher20.57 kB28.63 kB8.06 kB6.84 kB8.08 kB1.24 kB205.72 kB213.78 kB8.06 kB44.27 kB45.49 kB1.21 kB
Kareem_Abdul-Jabbar24.35 kB33.65 kB9.31 kB7.86 kB9.18 kB1.33 kB578.45 kB587.76 kB9.31 kB106.79 kB108.07 kB1.28 kB
The_Last_of_Us_(TV_series)22.48 kB28.38 kB5.9 kB7.36 kB8.66 kB1.3 kB831.48 kB837.38 kB5.9 kB137.01 kB138.3 kB1.29 kB
LeBron_James23.15 kB32.33 kB9.18 kB7.59 kB8.97 kB1.38 kB1.03 MB1.04 MB9.18 kB175.85 kB177.21 kB1.36 kB
Chadwick_Boseman20.97 kB29.6 kB8.63 kB6.88 kB8.26 kB1.38 kB534 kB542.63 kB8.63 kB95.2 kB96.56 kB1.36 kB
Pamela_Anderson20.31 kB30.75 kB10.45 kB6.69 kB8.12 kB1.43 kB343.8 kB354.25 kB10.45 kB68.73 kB70.16 kB1.43 kB
Black_Panther:_Wakanda_Forever22.16 kB29.84 kB7.68 kB7.25 kB8.78 kB1.52 kB467.14 kB474.82 kB7.68 kB85.12 kB86.57 kB1.46 kB
Harrison_Ford20.52 kB31.09 kB10.58 kB6.78 kB8.24 kB1.45 kB277.52 kB288.09 kB10.58 kB58.71 kB60.22 kB1.51 kB
Rihanna21 kB32.85 kB11.85 kB7.08 kB8.55 kB1.47 kB784.3 kB796.15 kB11.85 kB144.65 kB146.16 kB1.52 kB
Bruce_Willis19.07 kB30.41 kB11.34 kB6.37 kB7.86 kB1.49 kB254.58 kB265.92 kB11.34 kB54.38 kB55.9 kB1.52 kB
Avatar:_The_Way_of_Water21.89 kB30.24 kB8.35 kB7.29 kB8.86 kB1.57 kB582.6 kB590.95 kB8.35 kB103.34 kB104.87 kB1.53 kB
Ant-Man_and_the_Wasp:_Quantumania22.82 kB29.88 kB7.06 kB7.4 kB8.9 kB1.49 kB334.59 kB341.64 kB7.06 kB61.13 kB62.66 kB1.53 kB
Instagram19.22 kB32.91 kB13.69 kB6.37 kB8.1 kB1.73 kB786.67 kB800.36 kB13.69 kB138.45 kB140.12 kB1.67 kB
Dwayne_Johnson20.39 kB31.78 kB11.39 kB6.76 kB8.46 kB1.7 kB727.47 kB738.86 kB11.39 kB123.85 kB125.55 kB1.7 kB
Michael_Jordan20.19 kB31.78 kB11.59 kB6.72 kB8.41 kB1.69 kB578.59 kB590.18 kB11.59 kB115.73 kB117.44 kB1.71 kB
Beyonce20.63 kB35.4 kB14.78 kB6.96 kB8.82 kB1.87 kB1.13 MB1.14 MB14.78 kB199.03 kB200.86 kB1.84 kB
Jennifer_Lopez20.41 kB33.84 kB13.43 kB6.81 kB8.77 kB1.96 kB907.04 kB920.47 kB13.43 kB168.06 kB170.05 kB1.99 kB
Sex23.89 kB34.99 kB11.1 kB7.33 kB9.38 kB2.05 kB268.45 kB279.55 kB11.1 kB54.98 kB57 kB2.02 kB
Jimmy_Carter18.7 kB34.97 kB16.27 kB6.22 kB8.38 kB2.16 kB952.66 kB968.93 kB16.27 kB166.73 kB168.86 kB2.13 kB
YouTube18.59 kB36.14 kB17.54 kB6.22 kB8.37 kB2.15 kB989.04 kB1.01 MB17.54 kB182.03 kB184.21 kB2.18 kB
Premier_League19.77 kB32.28 kB12.51 kB6.58 kB8.8 kB2.22 kB738.89 kB751.4 kB12.51 kB118.46 kB120.67 kB2.21 kB
Leonardo_DiCaprio20.92 kB38 kB17.07 kB7.03 kB9.32 kB2.29 kB638.66 kB655.74 kB17.07 kB113.81 kB116.03 kB2.22 kB
Cleopatra20.48 kB35.77 kB15.29 kB6.81 kB9.06 kB2.25 kB812.14 kB827.42 kB15.29 kB143.07 kB145.29 kB2.22 kB
Lionel_Messi21.62 kB39.83 kB18.21 kB7.23 kB9.57 kB2.34 kB1.17 MB1.19 MB18.21 kB202.44 kB204.74 kB2.3 kB
Madonna21.38 kB37.32 kB15.94 kB7.18 kB9.48 kB2.3 kB819.01 kB834.95 kB15.94 kB159.04 kB161.37 kB2.34 kB
Elvis_Presley19.19 kB38.78 kB19.59 kB6.41 kB8.88 kB2.48 kB771.92 kB791.51 kB19.59 kB164.84 kB167.23 kB2.39 kB
List_of_highest-grossing_films20.67 kB29.56 kB8.89 kB6.83 kB9.23 kB2.4 kB982.28 kB991.16 kB8.89 kB156.35 kB158.76 kB2.42 kB
Manchester_United_F.C.19.8 kB38.36 kB18.56 kB6.51 kB9.2 kB2.7 kB610.11 kB628.67 kB18.56 kB94.08 kB96.8 kB2.72 kB
Cristiano_Ronaldo21.39 kB43.07 kB21.68 kB7.02 kB9.92 kB2.9 kB1.17 MB1.19 MB21.68 kB188.82 kB191.65 kB2.84 kB
2023_Turkey-Syria_earthquake21.49 kB35.32 kB13.83 kB7.02 kB10.06 kB3.04 kB1.09 MB1.11 MB13.83 kB195.27 kB198.26 kB2.99 kB
Valentine's_Day19.23 kB36.75 kB17.52 kB6.27 kB9.69 kB3.42 kB395.31 kB412.83 kB17.52 kB84.23 kB87.65 kB3.42 kB
India20.22 kB48.22 kB28 kB6.28 kB10.17 kB3.89 kB1.07 MB1.09 MB28 kB210.2 kB214.09 kB3.89 kB
Wikipedia18.5 kB50.49 kB32 kB5.98 kB10.12 kB4.14 kB1.03 MB1.07 MB32 kB192.95 kB197.22 kB4.28 kB
Turkey22.03 kB52.31 kB30.28 kB6.75 kB11.12 kB4.37 kB1.2 MB1.23 MB30.28 kB229.53 kB233.98 kB4.44 kB
2022_Russian_invasion_of_Ukraine39.12 kB63.4 kB24.28 kB9.71 kB14.9 kB5.19 kB1.11 MB1.13 MB24.28 kB197.64 kB202.82 kB5.19 kB
United_States22.12 kB64.47 kB42.36 kB6.64 kB14.25 kB7.61 kB1.27 MB1.31 MB42.36 kB241.89 kB249.31 kB7.42 kB

Body

Edit: This test didn't add all of the attributes/text we ended up using in production. See T331905#8716795 for the updated/more accurate version.

Out of the top 100 most popular pages for the month of February 2023:

  • Since this strategy put the languages at the end of the body, all pages were underneath the 14 kB transfer budget
  • The HTML transfer size for this strategy was slightly worse than the head strategy (8 kB vs 7.42 kB for the United States page)
Median diff html size paragraphMax diff html size paragraphMedian diff html transfer size paragraphMax diff html transfer size paragraphMedian diff html sizeMax diff html sizeMedian diff html transfer sizeMax diff html transfer size
:------------------------------:---------------------------:---------------------------------------:------------------------------------:--------------------:-----------------:-----------------------------:--------------------------
134 B134 B67 B73 B5.06 kB40.7 kB984 B8 kB
PageBefore html size paragraphAfter html size paragraphDiff html size paragraphBefore html transfer size paragraphAfter html transfer size paragraphDiff html transfer size paragraphBefore html sizeAfter html sizeDiff html sizeBefore html transfer sizeAfter html transfer sizeDiff html transfer size
:------------------------------------:-------------------------:------------------------:-----------------------:----------------------------------:---------------------------------:--------------------------------:---------------:--------------:-------------:------------------------:-----------------------:----------------------
Jake_Paul_vs_Tommy_Fury21.75 kB21.88 kB134 B7.08 kB7.15 kB65 B91.07 kB91.3 kB232 B18.5 kB18.6 kB104 B
Murdaugh_family21.48 kB21.62 kB134 B7.24 kB7.3 kB65 B268.43 kB268.85 kB418 B52.26 kB52.43 kB164 B
You_(season_4)22.32 kB22.45 kB134 B7.37 kB7.44 kB67 B103.62 kB104.05 kB429 B24.43 kB24.61 kB182 B
Tommy_Fury22.33 kB22.46 kB134 B7.39 kB7.46 kB71 B92.65 kB93.26 kB615 B21.56 kB21.75 kB190 B
Lux_Pascal21.11 kB21.25 kB134 B7.03 kB7.1 kB70 B63.23 kB63.89 kB658 B16.77 kB16.97 kB202 B
Brink's-Mat_robbery20.95 kB21.08 kB134 B7.09 kB7.16 kB72 B173.36 kB173.87 kB515 B35 kB35.21 kB208 B
Bigg_Boss_(Hindi_season_16)21.71 kB21.85 kB134 B7.18 kB7.25 kB67 B326.06 kB326.92 kB860 B57.3 kB57.55 kB245 B
Elimination_Chamber_(2023)22.54 kB22.68 kB134 B7.34 kB7.41 kB65 B163.48 kB164.59 kB1.1 kB34.59 kB34.87 kB272 B
Shehzada_(2023_film)22.09 kB22.22 kB134 B7.29 kB7.36 kB66 B117.76 kB118.72 kB964 B26.78 kB27.06 kB279 B
Jason_Kelce22.55 kB22.68 kB134 B7.4 kB7.47 kB68 B138.23 kB139.36 kB1.14 kB30.86 kB31.14 kB285 B
XXXX20.92 kB21.05 kB134 B6.98 kB7.05 kB68 B36.01 kB37.2 kB1.19 kB11.06 kB11.35 kB285 B
Varisu22.12 kB22.25 kB134 B7.38 kB7.45 kB66 B280.63 kB281.58 kB946 B49.27 kB49.57 kB300 B
Mac_McClung22.5 kB22.63 kB134 B7.34 kB7.4 kB65 B156.72 kB157.99 kB1.27 kB32.02 kB32.33 kB314 B
Jalen_Hurts22.77 kB22.9 kB134 B7.47 kB7.54 kB69 B194.33 kB195.52 kB1.19 kB38.53 kB38.85 kB322 B
Travis_Kelce22.3 kB22.43 kB134 B7.33 kB7.4 kB69 B327.67 kB329.05 kB1.38 kB51.89 kB52.22 kB333 B
Andy_Reid23.36 kB23.49 kB134 B7.53 kB7.6 kB68 B285.49 kB286.82 kB1.33 kB50.04 kB50.41 kB371 B
P._K._Rosy21.01 kB21.15 kB134 B6.89 kB6.95 kB64 B59.45 kB60.88 kB1.43 kB15.84 kB16.25 kB414 B
Super_Bowl_LVII23.17 kB23.3 kB134 B7.52 kB7.59 kB69 B326.51 kB328.51 kB2 kB62.78 kB63.2 kB420 B
Jessica_Watson22.97 kB23.11 kB134 B7.51 kB7.58 kB65 B204.62 kB206.82 kB2.2 kB41.85 kB42.31 kB455 B
XXX_(film_series)21.43 kB21.57 kB134 B7.07 kB7.14 kB65 B118.35 kB120 kB1.64 kB25.88 kB26.38 kB503 B
Pathaan_(film)21.79 kB21.93 kB134 B7.29 kB7.36 kB66 B323.02 kB325.2 kB2.18 kB51.17 kB51.68 kB511 B
Richard_Belzer21.6 kB21.74 kB134 B7.11 kB7.17 kB63 B142.71 kB145.26 kB2.55 kB32.99 kB33.5 kB512 B
List_of_Super_Bowl_champions21.78 kB21.92 kB134 B7.13 kB7.2 kB72 B357.95 kB359.7 kB1.75 kB51.57 kB52.08 kB515 B
Omegle20.72 kB20.86 kB134 B7.01 kB7.07 kB65 B59.38 kB62.3 kB2.92 kB16.43 kB16.94 kB516 B
Tommy_Lee21.82 kB21.96 kB134 B7.16 kB7.23 kB69 B154.87 kB157.77 kB2.9 kB34.75 kB35.28 kB521 B
List_of_Super_Bowl_halftime_shows20.41 kB20.54 kB134 B6.75 kB6.82 kB71 B281.58 kB283.37 kB1.8 kB52.54 kB53.1 kB564 B
Pakistan_Super_League21.4 kB21.53 kB134 B7.05 kB7.12 kB65 B175.94 kB178.27 kB2.33 kB34.91 kB35.49 kB587 B
Patrick_Mahomes22.71 kB22.84 kB134 B7.43 kB7.5 kB71 B447.49 kB450.48 kB2.98 kB75.84 kB76.43 kB594 B
Bella_Ramsey22.4 kB22.54 kB134 B7.3 kB7.37 kB65 B145.83 kB148.97 kB3.14 kB28.79 kB29.4 kB608 B
Hogwarts_Legacy21.62 kB21.75 kB134 B7.17 kB7.24 kB66 B362.83 kB365.94 kB3.12 kB59.47 kB60.09 kB611 B
Annie_Wersching21.38 kB21.51 kB134 B6.98 kB7.04 kB64 B84.81 kB88.11 kB3.31 kB19.76 kB20.39 kB627 B
Jake_Paul22.05 kB22.18 kB134 B7.27 kB7.34 kB70 B318.88 kB322.11 kB3.23 kB63.58 kB64.21 kB632 B
Kim_Petras21.28 kB21.42 kB134 B7.11 kB7.18 kB69 B203.14 kB206.51 kB3.37 kB41.11 kB41.76 kB648 B
Cocaine_Bear22.15 kB22.28 kB134 B7.32 kB7.39 kB70 B128.13 kB130.96 kB2.83 kB28.48 kB29.17 kB681 B
ASAP_Rocky22.61 kB22.74 kB134 B7.61 kB7.68 kB67 B355.23 kB359.35 kB4.12 kB64.53 kB65.22 kB693 B
Natasha_Lyonne22.71 kB22.84 kB134 B7.5 kB7.57 kB64 B199.4 kB203.3 kB3.91 kB40.49 kB41.19 kB696 B
The_Whale_(2022_film)21.43 kB21.56 kB134 B7.07 kB7.14 kB64 B245.19 kB248.5 kB3.31 kB43.24 kB44.03 kB781 B
Burt_Bacharach22.32 kB22.46 kB134 B7.41 kB7.48 kB67 B355.55 kB360.21 kB4.66 kB69.71 kB70.5 kB797 B
Christian_Atsu20.87 kB21 kB134 B6.84 kB6.91 kB65 B226.87 kB231.26 kB4.39 kB39.81 kB40.61 kB799 B
XXX_(2002_film)21.74 kB21.87 kB134 B7.29 kB7.35 kB67 B93.42 kB96.85 kB3.43 kB25.16 kB25.97 kB805 B
Knock_at_the_Cabin21.77 kB21.91 kB134 B7.24 kB7.3 kB65 B116.85 kB119.92 kB3.06 kB26.22 kB27.06 kB841 B
The_Last_of_Us22.26 kB22.39 kB134 B7.33 kB7.4 kB68 B517.38 kB522.4 kB5.01 kB84.32 kB85.18 kB857 B
XXXTentacion21.85 kB21.98 kB134 B7.31 kB7.38 kB70 B723.42 kB729.53 kB6.11 kB127.39 kB128.25 kB862 B
Tom_Brady21.57 kB21.71 kB134 B7.2 kB7.27 kB69 B1.12 MB1.13 MB4.53 kB179.15 kB180.02 kB862 B
The_Banshees_of_Inisherin21.89 kB22.02 kB134 B7.17 kB7.23 kB64 B182.9 kB186.96 kB4.06 kB37.51 kB38.39 kB876 B
Pedro_Pascal22.59 kB22.73 kB134 B7.49 kB7.57 kB73 B183.96 kB189.2 kB5.24 kB36.4 kB37.34 kB944 B
Andrew_Tate19.98 kB20.11 kB134 B6.59 kB6.66 kB66 B324.02 kB329.32 kB5.3 kB58.28 kB59.22 kB947 B
2023_Ohio_train_derailment22.98 kB23.12 kB134 B7.56 kB7.62 kB65 B313.55 kB317.21 kB3.66 kB59.32 kB60.28 kB963 B
Ansel_Adams21.23 kB21.37 kB134 B7.02 kB7.08 kB65 B372.55 kB377.93 kB5.38 kB72.95 kB73.92 kB965 B
Kiara_Advani21.24 kB21.37 kB134 B7.13 kB7.2 kB66 B264.03 kB269.14 kB5.1 kB46.37 kB47.34 kB974 B
Raquel_Welch19.68 kB19.82 kB134 B6.53 kB6.59 kB63 B326.78 kB332.89 kB6.11 kB65.05 kB66.04 kB994 B
XXX:_State_of_the_Union21.2 kB21.33 kB134 B6.97 kB7.04 kB65 B78.29 kB82.25 kB3.97 kB20.39 kB21.4 kB1.01 kB
Sam_Smith20.84 kB20.98 kB134 B6.97 kB7.04 kB70 B245.88 kB251.97 kB6.09 kB49.93 kB50.94 kB1.01 kB
You_(TV_series)20.99 kB21.13 kB134 B6.87 kB6.94 kB64 B442.15 kB446.34 kB4.18 kB76.38 kB77.41 kB1.02 kB
Disappearance_of_Madeleine_McCann21.74 kB21.88 kB134 B7.22 kB7.29 kB66 B497.65 kB501.81 kB4.16 kB104.42 kB105.47 kB1.05 kB
Super_Bowl21.93 kB22.06 kB134 B7.2 kB7.27 kB68 B379.83 kB385.79 kB5.96 kB77.47 kB78.53 kB1.05 kB
Jenna_Ortega20.78 kB20.91 kB134 B6.93 kB6.99 kB66 B320.24 kB326.09 kB5.85 kB57.59 kB58.66 kB1.08 kB
ChatGPT19.78 kB19.91 kB134 B6.54 kB6.61 kB66 B277.34 kB284.28 kB6.94 kB56.14 kB57.22 kB1.08 kB
Nikki_Haley20.65 kB20.78 kB134 B6.73 kB6.8 kB65 B490.86 kB497.22 kB6.36 kB91.67 kB92.79 kB1.12 kB
Sidharth_Malhotra20.95 kB21.08 kB134 B6.98 kB7.05 kB67 B171.69 kB177.97 kB6.28 kB34.44 kB35.6 kB1.16 kB
Deaths_in_202319.1 kB19.24 kB134 B6.45 kB6.52 kB73 B159.35 kB163.82 kB4.48 kB41.41 kB42.66 kB1.25 kB
Harry_Styles20.44 kB20.58 kB134 B6.8 kB6.87 kB69 B615.29 kB622.58 kB7.29 kB107.8 kB109.05 kB1.25 kB
List_of_highest-grossing_Indian_films20.77 kB20.9 kB134 B6.89 kB6.96 kB72 B792.74 kB797.64 kB4.9 kB116.68 kB117.96 kB1.28 kB
XXX:_Return_of_Xander_Cage21.75 kB21.88 kB134 B7.18 kB7.24 kB63 B162.47 kB167.79 kB5.32 kB35.15 kB36.46 kB1.3 kB
Ashton_Kutcher20.57 kB20.7 kB134 B6.84 kB6.9 kB63 B205.72 kB213.58 kB7.86 kB44.27 kB45.58 kB1.31 kB
The_Last_of_Us_(TV_series)22.48 kB22.61 kB134 B7.36 kB7.43 kB67 B831.48 kB837.37 kB5.89 kB137.01 kB138.37 kB1.36 kB
Kareem_Abdul-Jabbar24.35 kB24.48 kB134 B7.86 kB7.93 kB70 B578.45 kB587.53 kB9.08 kB106.79 kB108.17 kB1.38 kB
Chadwick_Boseman20.97 kB21.1 kB134 B6.88 kB6.94 kB64 B534 kB542.43 kB8.43 kB95.2 kB96.64 kB1.44 kB
LeBron_James23.15 kB23.29 kB134 B7.59 kB7.66 kB70 B1.03 MB1.04 MB8.9 kB175.85 kB177.3 kB1.45 kB
Pamela_Anderson20.31 kB20.44 kB134 B6.69 kB6.76 kB69 B343.8 kB353.95 kB10.14 kB68.73 kB70.2 kB1.47 kB
Harrison_Ford20.52 kB20.65 kB134 B6.78 kB6.85 kB68 B277.52 kB287.75 kB10.23 kB58.71 kB60.22 kB1.51 kB
Rihanna21 kB21.14 kB134 B7.08 kB7.15 kB70 B784.3 kB795.63 kB11.33 kB144.65 kB146.18 kB1.53 kB
Bruce_Willis19.07 kB19.2 kB134 B6.37 kB6.43 kB65 B254.58 kB265.53 kB10.95 kB54.38 kB55.92 kB1.53 kB
Ant-Man_and_the_Wasp:_Quantumania22.82 kB22.95 kB134 B7.4 kB7.47 kB65 B334.59 kB341.63 kB7.04 kB61.13 kB62.69 kB1.56 kB
Black_Panther:_Wakanda_Forever22.16 kB22.3 kB134 B7.25 kB7.32 kB64 B467.14 kB474.76 kB7.62 kB85.12 kB86.69 kB1.58 kB
Avatar:_The_Way_of_Water21.89 kB22.02 kB134 B7.29 kB7.36 kB67 B582.6 kB590.81 kB8.21 kB103.34 kB104.98 kB1.64 kB
Michael_Jordan20.19 kB20.32 kB134 B6.72 kB6.79 kB69 B578.59 kB589.79 kB11.2 kB115.73 kB117.47 kB1.74 kB
Instagram19.22 kB19.36 kB134 B6.37 kB6.44 kB69 B786.67 kB799.8 kB13.13 kB138.45 kB140.21 kB1.76 kB
Dwayne_Johnson20.39 kB20.52 kB134 B6.76 kB6.83 kB69 B727.47 kB738.51 kB11.05 kB123.85 kB125.62 kB1.77 kB
Beyonce20.63 kB20.76 kB134 B6.96 kB7.03 kB69 B1.13 MB1.14 MB14.13 kB199.03 kB200.95 kB1.92 kB
Sex23.89 kB24.03 kB134 B7.33 kB7.4 kB69 B268.45 kB279.11 kB10.66 kB54.98 kB57.07 kB2.09 kB
Jennifer_Lopez20.41 kB20.54 kB134 B6.81 kB6.88 kB66 B907.04 kB920.02 kB12.98 kB168.06 kB170.19 kB2.13 kB
Jimmy_Carter18.7 kB18.83 kB134 B6.22 kB6.29 kB70 B952.66 kB968.26 kB15.6 kB166.73 kB168.91 kB2.18 kB
YouTube18.59 kB18.73 kB134 B6.22 kB6.28 kB67 B989.04 kB1.01 MB16.64 kB182.03 kB184.22 kB2.18 kB
Premier_League19.77 kB19.9 kB134 B6.58 kB6.65 kB68 B738.89 kB751.04 kB12.16 kB118.46 kB120.73 kB2.27 kB
Cleopatra20.48 kB20.61 kB134 B6.81 kB6.88 kB68 B812.14 kB826.82 kB14.68 kB143.07 kB145.38 kB2.31 kB
Leonardo_DiCaprio20.92 kB21.06 kB134 B7.03 kB7.1 kB71 B638.66 kB655.2 kB16.53 kB113.81 kB116.24 kB2.43 kB
List_of_highest-grossing_films20.67 kB20.81 kB134 B6.83 kB6.9 kB72 B982.28 kB991.11 kB8.84 kB156.35 kB158.85 kB2.51 kB
Madonna21.38 kB21.52 kB134 B7.18 kB7.25 kB70 B819.01 kB834.29 kB15.27 kB159.04 kB161.56 kB2.52 kB
Lionel_Messi21.62 kB21.75 kB134 B7.23 kB7.3 kB66 B1.17 MB1.19 MB17.48 kB202.44 kB204.99 kB2.55 kB
Elvis_Presley19.19 kB19.33 kB134 B6.41 kB6.48 kB68 B771.92 kB790.69 kB18.77 kB164.84 kB167.46 kB2.62 kB
Manchester_United_F.C.19.8 kB19.93 kB134 B6.51 kB6.58 kB70 B610.11 kB628.15 kB18.04 kB94.08 kB96.8 kB2.72 kB
Cristiano_Ronaldo21.39 kB21.52 kB134 B7.02 kB7.09 kB68 B1.17 MB1.19 MB20.94 kB188.82 kB191.96 kB3.15 kB
2023_Turkey-Syria_earthquake21.49 kB21.63 kB134 B7.02 kB7.08 kB63 B1.09 MB1.11 MB13.59 kB195.27 kB198.47 kB3.2 kB
Valentine's_Day19.23 kB19.36 kB134 B6.27 kB6.34 kB70 B395.31 kB412.25 kB16.94 kB84.23 kB87.68 kB3.45 kB
India20.22 kB20.35 kB134 B6.28 kB6.34 kB66 B1.07 MB1.09 MB26.46 kB210.2 kB214.36 kB4.16 kB
Wikipedia18.5 kB18.63 kB134 B5.98 kB6.05 kB67 B1.03 MB1.07 MB30.41 kB192.95 kB197.55 kB4.61 kB
Turkey22.03 kB22.16 kB134 B6.75 kB6.81 kB65 B1.2 MB1.22 MB28.64 kB229.53 kB234.3 kB4.76 kB
2022_Russian_invasion_of_Ukraine39.12 kB39.25 kB134 B9.71 kB9.77 kB66 B1.11 MB1.13 MB23.69 kB197.64 kB202.85 kB5.22 kB
United_States22.12 kB22.25 kB134 B6.64 kB6.71 kB66 B1.27 MB1.31 MB40.7 kB241.89 kB249.89 kB8 kB

Looking at the top 100 articles for the month of January, the median number of language links is 37 and the average is 52. At the extreme side, there were 304 language links.
Average language links per page=52.83, Max = 304, Min = 0, Median = 37
If we look at the extreme case e.g. the United States article which has 309 languages synthetic testing does not reveal too much difference between the two approaches, however when looking at the first 14kb, in two cases, the link tag approach did exceed our budget.
Since there seems to be very little between the two solutions from a performance standpoint, including the languages in the HTML seems preferable given it 1) avoids adding duplicate information to desktop URLs 2) keeps mobile consistent with desktop and 3) Allows us to remove the Special:MobileLanguages page reducing our maintenance responsibilities. 4) Never exceeds the 14kb budget, even for highly translated pages.

Recommendation: Option 1 put languages in the body tag.

Change 891874 abandoned by Winston Sung:

[mediawiki/core@master] Add interlanguage links to alternate URLs

Reason:

Replaced-by: I55a25dfb8aba3d1b589a36ba4cba3bba0fe710a1

https://gerrit.wikimedia.org/r/891874

Change 897205 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] OutputPage: Update alternate URL comments for interlanguage links

https://gerrit.wikimedia.org/r/897205

Change 897205 merged by jenkins-bot:

[mediawiki/core@master] OutputPage: Update alternate URL comments for interlanguage links

https://gerrit.wikimedia.org/r/897205

Jdlrobson renamed this task from Make languages available to index crawlers in mobile version of article pages to [Spike] Make languages available to index crawlers in mobile version of article pages.Mar 13 2023, 5:25 PM

We've created T331905
Per sign off steps, I've created T331908

Change 891874 restored by Winston Sung:

[mediawiki/core@master] Add interlanguage links to alternate URLs

https://gerrit.wikimedia.org/r/891874

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/4152186d05/w/