How to Detect IE in ColdFusion

Save

Microsoft's Internet Explorer web browser is famous for giving web developers headaches, thanks to its unique rules for rendering styles and HTML tags. As a ColdFusion developer, you may wish to run a check to see which web browser a visitor is using before proceeding with a given action. Fortunately, ColdFusion makes this possible through its integration of standard CGI scope variables, including the one that searches for and recognizes the type and version of the browser being used to view your page. (See Reference 1)

  • Open the document in which you wish to run the browser check.

  • Insert the following code where you wish to place the conditional action:

    <cfif #CGI.HTTP_USER_AGENT# CONTAINS "MSIE">

    --- conditional action ---

    </cfif>

    (See Reference 1)

  • Save and publish your page. Your conditional action will now only process if your visitor is using a version of Internet Explorer. (See Reference 1)

References

  • Photo Credit Comstock/Comstock/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!