|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mobile Device sniffing
Let me start by saying I'm not the best Apache programmer... I'm familiar enough, but it's not exactly my specialty.
I've been tasked with creating a "mobile" version of a client's website. This "mobile" version is not just stripped down content... it's a unique subdirectory of their site with limited content. I need to redirect users coming into the site to this directory IF they're using a mobile device. Talking to my sys-admin, it looks like I have two pretty-good options: (1) use Apache to sniff the HTTP_USER_AGENT for known mobile browsers; if one is found, redirect to the mobile directory (2) use Apache to sniff the HTTP_ACCEPT to see if the browser supports WMA or WML; if it does, redirect to the mobile directory Here's my question... is either solution better? Is there a better solution? Option #1 leads me to believe that we'd have to constantly update a list of known mobile browsers... Option #2 leads me to believe that some non-mobile browsers might accidentally get redirected if they support WMA or WML... Anyone have some thoughts? |
|
#2
|
|||
|
|||
|
WURFL is a database of devices that should help in your quest. Depending on your implementation language they have examples that can do what you're looking for. However, no matter how frequently you update your local database there is always going to be the chance of missing a user-agent here and there.
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums. |
|
#3
|
||||
|
||||
|
Thread moved from Apache to WAP ... I didn't see a relation to Apache.
(3) Use at mobile stylesheet so you don't have to build a new website.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Mobile Programming > Mobile Device sniffing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|