Reputation: 32153
After looking through the questions on this site and doing a few internet searches for the topic, I haven't found a solution and was wondering if anyone had one or a link to a good one.
Is there any way, using HTML4 or 5 or JavaScript, to tell if a browser is on a mobile device and then redirect the user to another page?
Upvotes: 1
Views: 976
Reputation: 412
This can be helpful: http://detectmobilebrowser.com/
Can be used in a both client and server side, in different scenarios.
Upvotes: 3
Reputation: 9397
You can check that using JavaScript (pure HTML can not detect a user agent). There are however different ways to detect mobile browsers and as they always show up as regular browsers, it is more robust to check the browser type using the user agent and analyse it server side with PHP etc. You can than redirect the browser using some server side functionality.
Upvotes: 1