I'd like to detect when a user hits a webpage through a mobile (Android or Iphone) device, and set up a redirect to the relevant app-store when that connection is detected.
How would one go about implementing this?
Thanks
I'd like to detect when a user hits a webpage through a mobile (Android or Iphone) device, and set up a redirect to the relevant app-store when that connection is detected.
How would one go about implementing this?
Thanks
Copyright © 2021 Jogjafile Inc.
I wouldnt go with a user agent redirect if other options are available. Heres a list of options on google devlopers site, and why user agents arnt so great https://developers.google.com/webmasters/smartphone-sites/redirects There are a few ways to do this, the easiest way to accomplish your redirect is :
Javascript Method:
NOTE
You'll need to play around with different resolutions to redirect,
You'll also want to include your Meta tag
This means that the browser will render the width of the page at the width of its own screen.
OR
.htaccess Method:
Here is a link to CSS Tricks explaining different Meta Tags : > CSS Tricks Responsive Meta Tags
i'll also add that with the frameworks available today most sites can accommodate desktop and mobile all in one.
Checkout Twitter Bootstraps setup for mobile... easy to use and works great. http://getbootstrap.com/