Search code examples
iphonemobile-website

Can't get iphone web app to hide navigation bar using meta tag


So I'm using the following tags:

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">

if I understand correctly, this should remove the safari nav bar after I add the page to my home screen... unfortunately this is not happening. I tried adding a web app that I know works and it was fine so the problem is not with my device. I guess I'm missing something? Could this be a server problem?

In fact, I have access to multiple other servers and it works fine on them... but not this single server for some reason. Could there be some server configuration or htaccess file that could cause this?

Thanks!


Solution

  • The problem was that my index file was in a folder http://mywebsite.com/m/ and I was accessing it at http://m.mywebsite.com . It wasn't working on the later but works fine of the former.