• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Browser Detection

Community Beginner ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Is there a way to detect the browser the user has when the page loads in Coldfusion? sample would be a big help. thanks.
TOPICS
Advanced techniques

Views

682

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

do you mean detect it by CF or in general?
in general - use one of a multitude of browser sniffing js scripts;
in CF - look at #cgi.http_user_agent# - look at the available js scripts
and which parts of the useragent string they process to determine the
browser and write a cf script to do the same.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

TheScarecrow wrote:
> Is there a way to detect the browser the user has when the page loads in Coldfusion? sample would be a big help. thanks.

User agent strings can be parsed to make a best guess at browser.

Just be aware that there are a large host of host headers out there.
http://www.user-agents.org/


Also be aware that browsers can be configured to hide what they are.
Just look at Firefox's 'User Agent Switcher'.

http://en.wikipedia.org/wiki/User_agent

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

Is there a way to detect the browser version number?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

LATEST
yes. look at #cgi.http_user_agent# content.

if you are doing it with js, have a go at jQUery js library - it has
buitl-in functionality to detect both browser and browser version.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 07, 2008 Nov 07, 2008

Copy link to clipboard

Copied

it's one of the cgi variables.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation