www.page-test.co.uk/device.php
The script will return one of three messages:
(i) DESKTOP if it is a desktop computer / laptop.
(ii) MOBILE PHONE for mobile phones.
(iii) However, some devices have a more specific return. An iPad will return IPAD, and Android returns ANDROID etc.
‘BB OLD’ means BlackBerry OS before 4.6
People on here complain that PHP can’t do a perfect mobile detection script - I believe I have it.
Please test your mobile phones and if one fails my test I would appreciate information on it (phone, model and the user agent displayed in the test will help me improve).
Remember, returning just MOBILE PHONE is fine. Only select devices return the name (required for something I’m working on). The key thing is DESKTOP v MOBILE PHONE
With the support of the community to test and perfect my creation I can then release a final version to you all.
Using Firefox I got
MOBILE PHONE
Nokia6630/1.0 (2.3.129) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1
Why? That’s what I sent as HTTP User-Agent headers.
Can mobile phones be trusted to send the correct headers any moreso than browsers?
This isn’t about cheating the system.
If the user decided to cut off their hands then they also would find difficulty in viewing the intended web page.
The key thing is to use browser detection to HELP the user. If they want to cheat it then no problem, they can also cut off their hands and suffer in their viewing experience as well.
I use browser detection to slightly adjust content for certain ‘poor’ devices. You can remove this help if you want - no problem.
Some browsers do try and change their user agents - but none to the extent you have - and all are taken care of in my checks.
My request was for anybody to beat my checks - without changing the user agent sent. Good luck in doing that.