Forum Discussion
kc2kth_49679
Nimbostratus
Feb 24, 2009Identify Mobile Device Browsers
Has anyone done any work with identifying mobile devices/browsers and redirecting them? We are building a new mobile friendly version of our site and want to send all mobile devices to that new site. I thought the solution would likely revolve around looking at headers to identify the device type or browser id. I was hoping someone had or knew of a list of these id's that I could check for.
- hoolio
Cirrostratus
Here is a post which has a few examples on how to check the User-Agent header for keywords to identify mobile devices: - kc2kth_49679
Nimbostratus
So I'm back on this project. Good info - thanks. Quick question though, which would potentially perform better, a switch or match class? I was leaning toward the match class method, but noticed in the examples a switch was used that at least appears efficient. - hoolio
Cirrostratus
For a lot (more than ~100?) comparisons, I think a class is faster than a switch statement (Click here).
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects