Page MenuHomePhabricator

apple-touch-icon.png, $wgAppleTouchIcon and docroot cleanup
Closed, ResolvedPublic

Description

[18:28:26] <Reedy> Anyone familiar with the apple-touch-icon?
[18:30:08] <Reedy> Do apple products check for the existence of domain.ext/apple-touch-icon.png? Or do they use the <link rel="apple-touch-icon" href=" ?
[18:30:38] <Reedy> We've one wiki (enwiktionary) that is setup to use $wgAppleTouchIcon and hence output the link above in <head>
[18:30:56] <Reedy> And a hanful of others with apple-touch-icon.png images in their docroots (not in /w/)
[18:32:22] <Reedy> Halp.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz55917

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:18 AM
bzimport set Reference to bz55917.

So I'm likely to move most of those from their respective docroots onto bits or similar (like enwiktionary is currently), changing most of them to then be a link, rather than physical files in random docroots. Normalising the configuration somewhat.

I'm wondering if we need to do something like we do for favico for the apple touch images; rewrite /fav.ico to a php script, which pulls it from $wgFavIco, or we can just get by with it being as a page link.

'wgAppleTouchIcon' => array(
'default' => false, iOS searches for icons in docroot by default
'enwiktionary' => '
bits.wikimedia.org/apple-touch/wiktionary/en.png', // bug 46431
),

The "by default" comment leans towards we should have a rewrite and script for it..

I don't think a redirector is necessary if we set the default value, but if it's easier to manage than the config file that should work fine too. :)

Change 90762 had a related patch set uploaded by Reedy:
Moved all apple-touch-icon.png images to bits. Set $wgAppleTouchIcon where appropriate.

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

(In reply to comment #5)

Change 90762 had a related patch set uploaded by Reedy:
Moved all apple-touch-icon.png images to bits. Set $wgAppleTouchIcon where
appropriate.

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

This gives essentially the same behaviour, but makes all the files be handled in the same way. So it can be merged without changing any of the current behaviour.

What should we do for default? I know we tend to default to enwiki for somethings... Wikimedia might be more sensible.

Addition of more project images, and/or a default would be nice to be done in the near future.

This helps with my cleanup of most of the redundant docroot folders we have (removing apple touch just leaves the 3 standard symlinks)

Change 90762 merged by jenkins-bot:
Moved all apple-touch-icon.png images to bits. Set $wgAppleTouchIcon where appropriate.

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

https://bugzilla.wikimedia.org/show_bug.cgi?id=19392#c15

https://gerrit.wikimedia.org/r/#/c/60777/

It seems this might cause a problem for older apple devices... It shouldn't be too much work (copy and amend) to modify the favicon script to do something similar for a different global and to a different file...

I've deployed my change above, but not propagated the deletion (sync-docroot doesn't delete)

CC-ing Krinkle, who was involved in a discussion around 60777 (and who, I think, also suggested re-using the favicon script for Apple Touch icons).

No patches to review left here; resetting status

https://gerrit.wikimedia.org/r/#/c/170300/ did this (incorporated my patches doing it)