• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Power Tools for Web Developers > 47. Update Browser Detection Scripts

Update Browser Detection Scripts

Work out whether your web page is loaded into Firefox.

There are all kinds of Mozilla browsers and even different variants of Firefox [Hack #92] , although the standard distribution of Firefox is by far the most popular distribution. This hack explains how to detect Firefox. Your web page can also make a display contract with Firefox [Hack #46] .

Detect Firefox by UserAgent

Either behind the web server or in the web page, the foremost identifier of Firefox is the browser user agent (UA) string. The UA string is defined in RFC 1945 and RFC 2068. It is sent over the wire from web browser to web server in this header line:

User-Agent: string

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint