I'd put all this in a function, and run the user agent string through it. Then use the function call to return a boolean. Also, I found this function on CFLib.org.
http://cflib.org/index.cfm?event=page.udfbyid&udfid=1887 Might be worth giving it a try. andy -----Original Message----- From: Steve LaBadie [mailto:[email protected]] Sent: Wednesday, October 13, 2010 8:16 AM To: cf-talk Subject: Detecting Mobile Devices I have just finished the development of a mobile site for our university. I have placed a redirect script on the home page and everything seems to be working. I was wondering if there is a more streamlined approach to detecting the different devices. Right now I am checking for specific brands. I can see this list expanding as more devices come on the market. Any thoughts. <cfif findNoCase('blackberry', CGI.HTTP_USER_AGENT)> <cflocation url="http://esu.mpill.me" addtoken="no"> <cfelseif findNoCase('iphone', CGI.HTTP_USER_AGENT)> <cflocation url="http://esu.mpill.me" addtoken="no"> <cfelseif findNoCase('droid', CGI.HTTP_USER_AGENT)> <cflocation url="http://esu.mpill.me" addtoken="no"> <cfelseif CGI.HTTP_ACCEPT CONTAINS "text/vnd.wap.wml"> <cflocation url="http://esu.mpill.me" addtoken="no"> </cfif> Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu <http://www.esu.edu> [email protected] <mailto:[email protected]> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338112 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

