Adaptive-Images icon indicating copy to clipboard operation
Adaptive-Images copied to clipboard

Change UA test in is_mobile()

Open webbower opened this issue 12 years ago • 0 comments

https://github.com/MattWilcox/Adaptive-Images/blob/master/adaptive-images.php#L37

Mozilla Hacks recommends the following (from https://hacks.mozilla.org/2013/09/user-agent-detection-history-and-checklist/):

The most current case of user agent detection is to know if the device is a mobile to redirect the browser to a dedicated Web site tailored with mobile content. We recommend you to limit your detection to the simplest possible string by matching the substring mobi in lowercase.

/mobi/i // JavaScript

webbower avatar Sep 17 '13 22:09 webbower