inherit
139084
0
Nov 7, 2010 19:22:20 GMT -8
telefonica
3
March 2009
telefonica
|
Post by telefonica on Mar 27, 2010 8:15:42 GMT -8
Greetings-
I searched a bit but couldn't find anything on this; I know I'm probably looking up the wrong terms but I am just merely wondering if there is any code that would display in a thread whether or not you are posting from a mobile device. I use my PSP to check my forums often and was wondering if there was any coding akin to Facebook that would automatically display at the bottom of a post if you made that from a mobile device.
Just wondering.
Thanks for your time, Tele
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Mar 27, 2010 12:11:27 GMT -8
Such a code would be ambitious at the very least since distinguishing between a mobile and a regular browser is not as easy as it sounds. There's a code in the database that could be easily modified to add detection for PSP [ Mozilla/4.0 (PSP (PlayStation Portable); 2.00)]. The problem however would be to detect and identify the (literally hundreds of) different mobile user-agents in use now and in the future. This would require constant updating of the code every time something changed! Since a well-defined standard for constructing user-agents is almost non-existent there's really no single pattern in a UA string that would immediately identify it as a mobile - Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7D11 Safari/528.16
- BlackBerry9630/4.7.1.40 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105
- Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; HP iPAQ h6300)
- Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
- BenQ-CF61/1.00/WAP2.0/MIDP2.0/CLDC1.0 UP.Browser/6.3.0.4.c.1.102 (GUI) MMP/2.0
- Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.10031/298; U; en) (blackberry running opera!)
- HTC-ST7377/1.59.502.3 (67150) Opera/9.50 (Windows NT 5.1; U; en) UP.Link/6.3.1.17.0
As you can see, there really is no single thing a code would be able to look for in order to determine if it's a mobile. The alternative of identifying what is NOT a mobile isn't that much easier either. The bright side however is that Proboards V5 will officially cater to mobile browsers so when that's released there should be a much easier way to identify mobiles. I suspect it would be much simpler for a server to examine the request header for evidence of wml support. edit: hehe
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Oct 19, 2013 12:41:43 GMT -8
Haha, that's great.
|
|