I'm using the regular expression from http://detectmobilebrowsers.com/ to detect if if the site is being viewed on a mobile device. Just because of it's ease of use.

Mostly it seems to be working.

I'd like to know if that's a reliable technique.

  • 2
    Nothing compares to A-B Testing on real devices... Mar 23 '15 at 16:08

The interesting part here is that I actually imported this code into my website to redirect users to the correct version of the site depending on the device. as a result, I have earned more money.

I have also ran tests with google page-speed insights and also at webpagetest.org and even on my old phone. So far detectmobilebrowsers.com's detection scheme works nicely.

If you can, try to make your website with responsive design or use media queries and/or javascript to display the website properly based on a width and that will work for everyone including the most unpopular device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.