i have a high traffic website (1+ Millions visitors per day) and i need to detect their user agent. i have a list over 1000 mobile devices.
i run memcache to output dynamic content based on what page they access and params they put eg:
/document/page/1?textsize=large
and i don’t have static pages nor i cant use sub-domains.
i found different scripts that check user agent:
http://www.mobile-phone-specs.com/user-agent-browser/0/
http://detectmobilebrowsers.mobi/
http://detectmobilebrowsers.com/
my question is, performing these check every time a page load will make my site slow with the traffic i get
edit: i need to know in my php code if it’s a mobile or not browser.
how can i make this check to run faster?
Use all the answer above.
Use the CSS to display your page correctly. since its only display let the browser loads deal with it. just be careful of how big the css/js/images/html pages are, for slow devices it might take forever to load a page that does not load images or big js files (like old flip phone where you can see s**t on it)
on your php use a logic script to find out the most browser you get then save it in session so you dont have to check it everytime.
something like: