Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6643045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:00:08+00:00 2026-05-26T00:00:08+00:00

Is there a way to detection if a user is on a mobile device

  • 0

Is there a way to detection if a user is on a mobile device using just coldfusion only?

  1. I’m not doing a mobile redirect.
  2. I am using CSS media queries to change the layout to fit screen width.
  3. I just want to do a simple if mobile render this information else render this information instead to parts of the site not the whole thing. (ex: if mobile [show jquery animation] else show [link])
  4. I don’t want to waste time rendering both if only to do a display none to the info not going to be shown anyways.
  5. No javascript mobile detection (people might have javascript off on their browsers)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:00:09+00:00Added an answer on May 26, 2026 at 12:00 am

    I wrote a blog entry about this very thing!

    http://www.mccran.co.uk/index.cfm/2010/6/4/Simple-Coldfusion-script-to-detect-if-a-user-is-on-a-Mobile-platform

    <cfif findNoCase('Android', cgi.http_user_agent,1)>
    <!--- relocate to Android version of the mobile site --->
    <cflocation url="android/">
    <cfelseif findNoCase('iPhone', cgi.http_user_agent,1)>
    <!--- relocate to iphone version of the mobile site --->
    <cflocation url="iphone/">
    </cfif>
    

    You can easily detect the browser from the user agent string. Tho as I’ve experienced recently browsers like chrome will allow you to change your user agent string:

    http://www.mccran.co.uk/index.cfm/2011/9/25/Samsung-Galaxy-Tab-101-Switching-your-browser-from-mobile-view

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any standard way of detecting when a user is away or not
Is there a way for my iPhone app to add media (mp3s) not in
Is there a way to avoid row deletion on an specific table using constrains?
Is there way in next piece of code to only get the first record?
Im looking for a way to detect if the user is using Opera Mini
Using a JEditorPane, is there any way to tell if the caret is currently
Is there an efficient way of detecting if a jpeg file is corrupted? Background
Is there a reliable way of detecting what version of Java is installed on
Possible Duplicate: Is there any way to determine text direction from CultureInfo in asp.net?
is there way thats i can preselect an item when the page loads or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.