Can anyone remend the best way to detect mobile device accessing a site - we want to re-direct to a mobile version rather than restyle the existing page due to CMS restrictions.
We also need the option to be able to return to the full site on mobile if requested.
We have a server, but aren't developers so would have to pay for dev work to be done server side - we are just wondering the best method to use.
Can anyone remend the best way to detect mobile device accessing a site - we want to re-direct to a mobile version rather than restyle the existing page due to CMS restrictions.
We also need the option to be able to return to the full site on mobile if requested.
We have a server, but aren't developers so would have to pay for dev work to be done server side - we are just wondering the best method to use.
Share Improve this question edited Apr 20, 2012 at 14:49 Crab Bucket 6,2779 gold badges41 silver badges73 bronze badges asked Mar 6, 2012 at 15:51 DancerDancer 17.7k40 gold badges131 silver badges213 bronze badges6 Answers
Reset to default 5take a look at this URL: http://detectmobilebrowsers./
they have code for both server side and client side (jQuery/JavaScript).
If by directing to a mobile version you mean just a design change specific to mobile and not functionality changes for mobile users, then look into Responsive design which dynamically changes your design based on resolution of the current users view using media queries.
Media Queries Spec W3C
Responsive Design Guidelines
This approach should not be limited by any kind of CMS as it is straight CSS use.
See below link i have answered here it might help you. same question as you asked Dear Paul.
Auto Mobile Site Redirect
Snippets for below are present on above link.
- Detecting Smartphones Using JavaScript
- Detecting Mobile Devices Using PHP
- iPhone & iPod Detection Using JavaScript
- Detect mobile.js and github etc.
As pritaes suggested, I'd remend WURFL. The new cloud-based detection service is now available with free accounts and new capabilities like "jqm_grade", which tells you the jQuery Mobile Grade (support level), so you know what type of content to serve before sending it to an unsupported device.
Personally, for server side detection I like WURFL. It has a .NET API available.
There are open source options that arn't cloud based if you want something you have more control over. 51Degrees.mobi are worth checking out. They have implementations in PHP, C, as well as a few others. I've used them before now and found them to be pretty good. There's also a really in depth article on the Nokia developers website about device detection that's worth a read.