0

I built a mobile app with html5. Upon being visited on a desktop, I would like the app to redirect to a page prompting the user to download the app on their phone/tablet. How should I go about this? media queries? if so, what would be the right syntax?

Thank you!

annie

annie
  • 1

1 Answers1

0

I could give you an answer, but I feel that this thread describes in much more detail the pros and cons of many different avenues of approach.

I think javascript would be the best way of doing it. But I believe similar libraries are available in PHP. Also, CSS has a couple of ways of linking to style sheets for mobile only devices. This could be used to display or hide a <div> element containing information about downloading, or even a qr code.

Community
  • 1
  • 1
Vap0r
  • 2,418
  • 2
  • 19
  • 35
  • Thank you for the link. I have perused them quite systematically and think I am getting close. The alternate css version would be too convoluted, as I want a completely different content for the desktop version.I have tried but the page doesn't seem to redirect to the nophone.html url... – annie Aug 08 '11 at 14:20
  • That's not even close. You can't use the link tag or html files. You'd have to use javascript like suggested in the other thread. – Vap0r Aug 08 '11 at 15:57