This content has been marked as final. Show 5 replies
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.
> 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.
Also be aware that browsers can be configured to hide what they are.
Just look at Firefox's 'User Agent Switcher'.
it's one of the cgi variables.
Is there a way to detect the browser version number?
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.