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.
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.
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.