Page MenuHomePhabricator

Make sure removal of the .m domain work as it is expected
Closed, ResolvedPublic

Description

One of the reasons (except that almost all other web entities removed the .m domain) is that Google sometime ago changed so in the search result, they always link to the domain without the m. That means when you are on mobile and click on the link in the search at Google you will get an extra redirect to the correct domain (instead of us handle it internally). By collecting data how it works today and collect data after the change we will be able to prove that it works the way we want (no redirect). We do test some of this functionality in the performance monitoring but it uses emulated devices (a desktop machine that says it is a mobile device) and we need verify that it really works so having data from real mobile phones is more safe.

Let's collect real traces from a phone before we do the change and after we did the change. I'm thinking of two different user scenarios:

  • direct access to a wikipedia article using the desktop domain, using a mobile phone
  • click on a wikipedia link on Google search result, using a mobile phone.

Lets do it on https://it.wikipedia.org (the change happen 8-11 September) and then on https://en.wikipedia.org (22.-26 September). See the subtasks.

AC:

  •  Add the test configuration and scripts so its reproducible.

Event Timeline

Here's the test script I used for search. Could probably had done more with just actions but I didn't want to spend time on fine-tune, this works.

/**
 * @param {import('browsertime').BrowsertimeContext} context
 * @param {import('browsertime').BrowsertimeCommands} commands
 */
export default async function (context, commands) {
  await commands.navigate('https://www.google.com/');
  await commands.click.byXpathAndWait("//div[text()='Accept all']");

  await commands.addText.byName('it.wikipedia.org Juventus', 'q');

  const seleniumWebdriver = context.selenium.webdriver;
  const Key = seleniumWebdriver.Key;
  await commands.action.getActions().sendKeys(Key.ENTER).perform();
  await commands.wait.byTime(2000);
  await commands.js.run(
    'for (let node of document.body.childNodes) { if (node.style) node.style.display = "none";}'
  );
  await commands.measure.start('juventus');
  await commands.click.byXpathAndWait(
    "//a[@href='https://it.wikipedia.org/wiki/Juventus_Football_Club']"
  );
  return commands.measure.stop();
}
Peter renamed this task from Collect HAR/traces before and after the removal of the m. domain to Make sure removal of the .m domain work as it is expected.Sep 4 2025, 1:36 PM
Peter updated the task description. (Show Details)

We did it. and it worked just fine, so need to do en.