Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts

    AOL specific style sheet script

    Hi all,

    I currently have a script that loads a style sheet based on browser (IE,NN) and platform (PC, Mac). My question is, is there a way to detect if someone is using an AOL browser to have the page load a style sheet specific to AOL?

    thanks in advance

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    check out the user-agent string of the browser. if it has AOL in it, then you can create a stylesheet for it!

    something like...

    Code:
    if (navigator.userAgent.indexOf("AOL") != -1) alert("is AOL") ;
    hope that helps

  • #3
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    perfect. It works great! Thanks for your help

  • #4
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Is it possible to also use navigator.appName for AOL? Is there a benefit of one over the other?

    I keep getting issues with some AOL users not being able to read the text (i.e. too small to read)

    I don't understand this, I am using the browser detection script above to point to the old style sheet so that AOL can view the pages. It works for some of the people having issues, but not others so my thinking is that userAgent tag is prohibiting them from viewing the correct style sheet?
    I thought is was disabled javascript but that was not the case.

    This is sooooo damn frustrating as I can not for the life of me duplicate this problem (I've tested AOL 4, 7, 8, and 9)

    Could it be an AOL thing?

    please help!

    thanks
    finstah

  • #5
    Senior Coder
    Join Date
    Feb 2004
    Location
    Edinburgh
    Posts
    1,352
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i don't think appName will reveal anymore information about AOL, for the simple reason that AOL is based on other browsers. this is perhaps the source of your problem, since some versions of AOL use IE and others Netscape. you'll probably have to use a mixture of userAgent and object detection.

    yes, it's frustrating, but it's really just a case of experimenting and reitierating the process till you've got it as good as possible. it'll never be perfect, all you can do is make it the best for as many people as possible without sacrificing too much.

  • #6
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    here's what I have. I've created a style sheet using em and % for fonts that renders correctly on these:

    PC:
    NN 4.79, 7.02,
    Mozilla 1.6, 1.7
    IE 5.5, 6
    Opera 7.11, 7.5
    Firefox 0.9

    Mac:
    IE 5.2, 5.2.2
    NN 4.77, 4.79, 6.22, 7.02, 7.1
    Mozilla 1.6
    Opera 7.5
    Safari 1.0, 1.2
    Firefox 0.7, 0.8
    OmniWeb 4.5
    Camino 0.7

    Linux:
    Mozilla 1.6
    Firefox

    The problem with too small text is coming from a few AOL users regardless of browsers. Because there are so many variables involved with each users machine, it's hard to pinpoint what the problem is. When I test AOL (v. 4,7,8,9) here at work on win95, win98, win2000 and winXP, I can't duplicate the problem, my script works here.

    Somehow I think it's something with their current configuration. Oh well, I'll spend a little more time on it before we decide to live with it.
    Last edited by finstah1; 07-22-2004 at 02:56 PM.

  • #7
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    this is what I came up with. Hopefully it will work.

    ((navigator.userAgent.indexOf("AOL") != -1) && (document.getElementById || document.all || document.layers))


  •  

    Posting Permissions

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