ColdFusion Detect iPad or Android tablet

This example uses tablet detection to specify a 1.0 scale for tablet devices.
<cfif Find("iPad", CGI.HTTP_USER_AGENT) OR 
     (Find("Android", CGI.HTTP_USER_AGENT) AND 
         not Find("Mobile", CGI.HTTP_USER_AGENT))>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
Snippet Viewed 11139 times.

Share your ColdFusion code snippets:

  • Get some recognition & link back to your site.


Submit | Browse

Most Recent coldfusion snippets

Most Viewed