boardr00
08-17-2004, 04:14 AM
I was wondering how I can dedect if users have opera or firefox browsers. I wrote a script to check for ie and netscape but don't know what to put for appname for these two. Any help is greatly appreciated.
<script language="Javascript">
var browser_type=navigator.appName
var browser_version=parseInt(navigator.appVersion)
if (browser_type=="Netscape"&&browser_version>=7)
window.location.replace("http://www.syntechhosting.com/Home.htm")
else if (browser_type=="Microsoft Internet Explorer"&&browser_version>=6)
window.location.replace("http://www.syntechhosting.com/Home.htm")
else window.location=("http://www.syntechhosting.com/BrowserWarning.htm" )
</script>
Zopester
08-17-2004, 04:53 AM
First I'd ask yourself whether making users of older browsers download a newer version just to visit your site is an acceptable use of their time.
If I was confronted with that message, I'd go somewhere else.
Having said that, I filter browsers, but I filter using CSS, and even those who don't see the site as designed, see a plain, unstyled version.
My advice? Dump the browser detection scripts because they're more trouble than they're worth, and find a better solution.
BigBison
08-17-2004, 06:57 AM
Also, I have a nifty little drop-down menu on one of my Opera toolbars which lets me identify as Opera, Mozilla or IE. It's incredibly frustrating when a site won't work unless I lie about my browser!
boardr00
08-17-2004, 03:13 PM
Any suggestions for a better solution. I can't get my site to work properly with older browsers. The reason is that I am currently using a frame for my navigation menu. This is because it was the only way I could get it to expand without pushing the rest of the site down each time. Any way around this?
www.syntechhosting.com
Also, suggestions for load time improvements are appreciated.
the_pm
08-17-2004, 03:33 PM
Yes, first of all, ditch frames entirely. I think I might have either posted reasons for this elsewhere or PMed you with them, but using them is an extraordinarily bad idea. Instead, you'll want to use a combination of JavaScript/DOM, CSS z-index, CSS visibility and CSS positioning (maybe). Just keep in mind this type of menu will not layer on top of ActiveX controls (such as Flash), which doesn't appear to be a problem on your site.
However, I (and as I've just read, Zopester) strongly recommend removing this immediately:
Attention: You are currently using an old version of your browser. This may cause errors in the presentation of our site. We recommend that you take the time to download the latest version of your browser.
*Netscape Upgrade* *IE Upgrade*
This is about the worst possible message you can display to a Web developer, especially when you propose the person attempting to view your site with a standards-compliant browser downgrade to the two oldest pieces of browsing technology available. Regardless, I should be able to enter your site using any browser of my choosing without being harrassed and navigate it unimpeded (yes, even with JS and/or images disabled).
Don't get added to this list! http://webtips.dan.info/brand-x/useragent.html#HallOfShame
Seriously, browser-sniffing and warning messages are a clear indication to Web developers that the site is faulty. Web technologies are universal languages, independent of any one browsing platform, so long as the browsers in question conform to some generally accept industry standards. Of course, your site should then conform to these same standards as well...
boardr00
08-17-2004, 03:38 PM
Very good post. I agree about the frames and will work to make my site cross browser compatible. I am willing to invest the time to work on this, so hopefully I can improve my site.
When it comes to the frame, I completely agree that it should be gone but I couldn't figure out how to do it without it pushing the page down.
The_pm- it sounds like you know of a way to accomplish this. I don't know how to use those methods to do this so do you think you could help me out? I would be willing to pay someone if they can accomplish this.
Would my menu then be cross browser compatible?
Thanks.
the_pm
08-17-2004, 03:40 PM
Yes, I can help you accomplish this.
No, you can't pay me to do it. ;)
(but if someone else wants to do it quicker and you want to pay them, that's totally up to you)
I just need to catch my breath a bit, and then I'll work up something for you.
boardr00
08-17-2004, 03:45 PM
Thank you very much. I really appreciate all the help you guys offer. As I stated, I am not a web designer and I made my site this way because I didn't know better. However, I am willing and eager to learn. If you could possible work out the menu without frames that would be great. Also if you could see what needs to be done as far as optimization and stylesheets on the homepage, and tell me. I will then learn from that and redo the rest of my site. THANKS!
P.S. The browser detect is gone. :)