Jump to content

Topic on Talk:Mobile support in MediaWiki core

Add meta viewport width=device-width tag to each page right away

5
Jidanni (talkcontribs)

Wouldn't a simple <meta name = "viewport" content = "width=device-width"> added to the header of each page make all Mediawiki sites look better on mobile right away? It wouldn't affect non mobile browsers too. Currently one must go to Manual:FAQ#How do I add meta tags? lengths or add extensions to do that. No simple LocalSetting.php way either.

Dantman (talkcontribs)

Current skins aren't built to handle mobile device widths. Doing that would cover tabs in some skins and make sidebars cramp the content.

For viewport to work a skin has to be custom developed to be responsive.

FreedomFighterSparrow (talkcontribs)
Jidanni (talkcontribs)

OK I have installed MobileFrontend.

216.49.181.252 (talkcontribs)

In case anyone is still looking, here is one solution:

$out->addHeadItem('viewport', '<meta name="viewport" content="width=device-width">');

Reply to "Add meta viewport width=device-width tag to each page right away"