View Full Version : AOL specific style sheet script
06-04-2004, 02:42 PM
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
check out the user-agent string of the browser. if it has AOL in it, then you can create a stylesheet for it!
if (navigator.userAgent.indexOf("AOL") != -1) alert("is AOL") ;
hope that helps :D
06-04-2004, 05:20 PM
perfect. It works great! Thanks for your help :thumbsup:
07-21-2004, 09:39 PM
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?
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?
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.
07-22-2004, 02:53 PM
here's what I have. I've created a style sheet using em and % for fonts that renders correctly on these:
NN 4.79, 7.02,
Mozilla 1.6, 1.7
IE 5.5, 6
Opera 7.11, 7.5
IE 5.2, 5.2.2
NN 4.77, 4.79, 6.22, 7.02, 7.1
Safari 1.0, 1.2
Firefox 0.7, 0.8
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.
07-22-2004, 03:50 PM
this is what I came up with. Hopefully it will work.
((navigator.userAgent.indexOf("AOL") != -1) && (document.getElementById || document.all || document.layers))
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.