Page MenuHomePhabricator

Link colours don't change to purple in Safari on Parsoid-served pageviews
Open, In Progress, Needs TriagePublicBUG REPORT

Description

For me, on my iPhone 12 mini, I can reproduce the bug […]. If I visit enwiki:Hampi and click around and come back, the links are all blue after all the clicking around. If i add "?useparsoid=0" to the links, the purple visited link color now shows up as expected.

Original task description by @Velociraptor888:

Steps to replicate the issue:

What happens?: Link remains blue

What should have happened instead? Link should have become purple

Event Timeline

I’m using mobile mode.

Some pages on desktop mode have the same problem though.

stjn subscribed.

T379645: Parsoid does not convert underscores to spaces for interwiki links is what causes this discrepancy from Parsoid, and I doubt there is another reason for it so I closed this as a duplicate. On mediawiki.org specifically, it is also the fact that there are Special:MyLanguage/ links there which do not lead exactly to the pages you end up on.

stjn edited projects, added: Parsoid-Read-Views; removed: MediaWiki-General.

Sorry, may have been premature. This is specific to mobile Parsoid according to reports:

but probably not exactly the same as that other task.

This is not an issue in Firefox on the mobile website. On VPT there appears to be a belief this may be a Safari bug.

It's certainly happening in Safari on an iPad, in desktop mode. Also, I have Parsoid disabled

@OSleger-WMF are you sure it’s the same bug? I was also under this impression but it seems different since users report that they don’t see it just for interwiki links.

Jonesey95 reopened this task as Open.EditedJul 2 2026, 2:18 PM
Jonesey95 subscribed.

This ticket appears to have been closed in error as a duplicate. See https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&curid=3252662&diff=1362194586&oldid=1362152419#Links_not_changing_colour for a description of the problem, including links to pages that do not have underscores in their wikilinks and are not linking to other wikis.

The issue does appear to be isolated to Safari (desktop and mobile on Mac OS and iOS), and when the bug reporter switched to useparsoid=0, the problem went away.

Parsoid output has protocol-relative links instead of normal relative links, e.g. <a href="//en.wikipedia.org/wiki/Foo"> instead of <a href="/wiki/Foo">. I wonder if that might be the cause? They should be recognized as the same link target, but maybe Safari handles this incorrectly.

For me, on my iPhone 12 mini, I can reproduce the bug on both Safari & Firefox. If I visit enwiki:Hampi and click around and come back, the links are all blue after all the clicking around. If i add "?useparsoid=0" to the links, the purple visited link color now shows up as expected. So, per @matmarex 's speculation above, it is possible something about Parsoid's href is causing Safari to not handle this properly. (EDIT: And, @OSleger-WMF tells me that on the iPhone, even Firefox uses Safari core underneath).

Parsoid output has protocol-relative links instead of normal relative links, e.g. <a href="//en.wikipedia.org/wiki/Foo"> instead of <a href="/wiki/Foo">. I wonder if that might be the cause? They should be recognized as the same link target, but maybe Safari handles this incorrectly.

Feels like it’d be easy to check by making a demo page somewhere with all the different variants of outputting a link like this (relative ones could be supported in the demo by using <base> tag).

OSleger-WMF claimed this task.

I have make demopage and tested different variants with base set to https://en.wikipedia.org/wiki/53rd_Academy_Awards:
My starting setup is just one time visited page https://en.wikipedia.org/wiki/Ordinary_People, Here are the results:

image.png (2,450×968 px, 412 KB)

Same as canonical - link weas highlighted before I even clicked it -> it counts the same as https://en.wikipedia.org/wiki/Ordinary_People
Highlight after click - I must have clicked on that spacific link to make it highlighted
No highlight at all - No action makes the link highlighted

OSleger-WMF removed OSleger-WMF as the assignee of this task.

Fixing my mistake of closing...

Also, I have made some experiment related to ":visited" pseudo-class within the safary, and it looks like it only assigns ":visited" pseudo-class to elements based on only pure html which came from server. Any JS or developer changes are not making link to aquire or lose a :visited" pseudo-class, no matter the change. So any JS solution will not work.

Can you make that page publicly available somewhere for others to test? There should be WMF-provided hosting on https://people.wikimedia.org IIRC

I am afraid, that I do not have access to that server, but I compacted my experiment into one file so anybody else can try / publish it.

For me, on my iPhone 12 mini, I can reproduce the bug on both Safari & Firefox.

Beware that the only browser engine Apple allows on iPhone is Safari. Other browser apps distributed in the App Store (such as Firefox, Edge, and Chrome) are, unlike their counterparts on desktop and Android, reduced to mere UIs around an OS-bound frame running an inferior version of Safari ("WebView") which includes a version of the WebKit layout engine and JSC JavaScript engine that, among other differences, are slower than Safari and disables features such as WebRTC which Apple enables in Safari but forcefully keeps out of WebView-based browser apps. See also https://open-web-advocacy.org/walled-gardens-report/ and https://open-web-advocacy.org/press/.

So for the purposes of this task, it is "just" a Safari bug.

Krinkle renamed this task from Link colours on mobile not changing to purple when clicked on to Link colours don't change to purple in Safari on Parsoid-served pageviews.Jul 8 2026, 7:11 PM

After my comment someone at Apple pulled it into their Radar system, and Anne started working on it. A fix has appeared! https://github.com/WebKit/WebKit/pull/69114

After my comment someone at Apple pulled it into their Radar system, and Anne started working on it. A fix has appeared! https://github.com/WebKit/WebKit/pull/69114

Nice work !

For everyone, this change likely already missed the upcoming late summer release of Safari 27, as 27 beta was cut before WWDC. So I suspect this will not land with consumers till november when 27.1 will be released.