Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Android tablet useragent vs. Android mobile useragent

Only mobile devices are supposed to redirect in this scenario, but android tablets are recognized as mobile devices because their useragent is not very unique. Please see below:

 

 

 

when HTTP_REQUEST {

 

set httpuri [string tolower [HTTP::uri]]

 

set useragent [string map {" " "_"} [string tolower [HTTP::header user-agent]]]

 

if {

 

((!($useragent contains "firefox"))) && (([class match $useragent contains MOBILE_DEVICE_LIST]))

 

|| ([HTTP::header x-wap-profile] ne "")

 

}{

 

HTTP::redirect http://redirectpage

 

} }

 

 

 

class MOBILE_DEVICE_LIST {

 

{

 

"android"

 

...

 

...

 

...

 

}

 

}

 

 

 

Example Useragent for android mobile

 

mozilla/5.0_(linux;_u;_android_2.3.5;_en-us;_n860_build/gingerbread)_applewebkit/533.1_(khtml,_like_gecko)_version/4.0_mobile_safari/533.1

 

 

Example Useragent for android tablet

 

mozilla/5.0_(linux;_u;_android_3.1;_en-us;_gt-p7510_build/hmj37)_applewebkit/534.13_(khtml,_like_gecko)_version/4.0_safari/534.13

 

 

 

 

What is the best way to not inclue the andriod tablet in the redirect? Take out 'andriod' and put in '4.0_mobile_safari'?

 

2 REPLIES 2

soymanue
Nimbostratus
Nimbostratus
I guess you already fixed that.

 

Anyway:

 

http://googlewebmastercentral.blogspot.com.es/2012/11/giving-tablet-users-full-sized-web.html

soymanue
Nimbostratus
Nimbostratus
I guess you already fixed that.

 

Anyway:

 

http://googlewebmastercentral.blogspot.com.es/2012/11/giving-tablet-users-full-sized-web.html