SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2000
    Location
    natick, ma, usa
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi all...

    I know you can use Javascript to detect browser type & version. Can you use it also to detect platforms?

    I've just taken a mini-javascript class so I'm a newbie at this, but I'd like to make a script that will detect whether the person is on Netscape or IE for windows, mac or unix. Once detected, I'll have it display the correct Cascading Sytle Sheet for that browser.

    I know this can be done, I just have no idea where to start.

    Thanks.

    emily

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can access such information using the HTTP_USER_AGENT variable.

    Output looks like this:

    Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0

    Mozilla/4.73 [en] (Win98; U)

    etc
    etc

    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Emily, in future please avoid cross-posting in different forums. I guarantee you'll receive an answer (as you already have in your other thread) by simply posting one thread.
    My 2 Cents (or is that 2.2 Cents including GST?)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •