[GAE] 判別使用者使用哪個裝置連線
其實一開始的問題只是想知道client IP, webapp2 API找了老半天沒有, 結果是在更底層的webOb (TMD...)
Anyway, 剛好手邊有iphone, ipad, imac 跟 asus nb, 就來紀錄一下各自的 User-Agent...
Apple的browser都是 safari, asus我用IE, Chrome, FF
Safari:
iphone(iOS5) - Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
ipad(iOS5) - Mozilla/5.0 (iPad; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
iMac(MacOS10.6.8) - Mozilla/5.0 (Macintosh; Intel Mac OS 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/7534.50
Chrome:
ASUS(Windows 7) - Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535. (KHTML, like Gecko) Chrome/15.0.874 120 Safari/535.2
iMac(MacOS10.6.8) - Mozilla/5.0 (Macintosh; Intel Mac OS 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Chrome/15.0.874 121 Safari/7534.50
IE:
ASUS(Windows 7) - Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.2; SLCC2; .NET CLR 2.0.50727; .NET CLR3.5.30729; .NET CLR 3.030729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
FF:
ASUS(Windows 7) - Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0 Safari/535.2
嗯, 若要知道user從哪種機器連, 可以用藍色去判別;
若要知道user使用那種OS, 則用紅色;
綠色責是判別使用何種browser.
手邊沒有Android不知道android會怎麼顯示, 而且檢查是否為safari似乎得用刪去法 = =a...
hmmm.... just take a note...
Anyway, 剛好手邊有iphone, ipad, imac 跟 asus nb, 就來紀錄一下各自的 User-Agent...
Apple的browser都是 safari, asus我用IE, Chrome, FF
Safari:
iphone(iOS5) - Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
ipad(iOS5) - Mozilla/5.0 (iPad; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3
iMac(MacOS10.6.8) - Mozilla/5.0 (Macintosh; Intel Mac OS 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/7534.50
Chrome:
ASUS(Windows 7) - Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535. (KHTML, like Gecko) Chrome/15.0.874 120 Safari/535.2
iMac(MacOS10.6.8) - Mozilla/5.0 (Macintosh; Intel Mac OS 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko) Chrome/15.0.874 121 Safari/7534.50
IE:
ASUS(Windows 7) - Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.2; SLCC2; .NET CLR 2.0.50727; .NET CLR3.5.30729; .NET CLR 3.030729; Media Center PC 6.0; .NET4.0C; .NET4.0E)
FF:
ASUS(Windows 7) - Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0 Safari/535.2
嗯, 若要知道user從哪種機器連, 可以用藍色去判別;
若要知道user使用那種OS, 則用紅色;
綠色責是判別使用何種browser.
手邊沒有Android不知道android會怎麼顯示, 而且檢查是否為safari似乎得用刪去法 = =a...
hmmm.... just take a note...
Comments
Post a Comment