homepage Welcome to WebmasterWorld Guest from 54.166.228.100
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
browser detecting javascript
rcjordan




msg:1493095
 8:04 pm on Aug 6, 2000 (gmt 0)

from another thread in this forum
>a standard javascript browser detection

I'm using a heavy, "tests for everything" script for browser detection and am considering lightening the load. What is the latest-and-greatest script out there that best serves V4 browsers and up?

 

tedster




msg:1493096
 8:33 pm on Aug 6, 2000 (gmt 0)

I only test for whatever the critical factors are -- and I hate bloat, so I write it myself instead of using third party scripts.

I haven't yet had a site that needed a check for specific versions above 4.0 -- just NN or IE has been enough. However, Netscape 6 may change that.

iggy99




msg:1493097
 12:49 am on Aug 7, 2000 (gmt 0)

hey tedster...

how are you doing!

this is my first post to this topic...

i too am trying to clean up and streamline my pages...

but i am looking for a server side browser sniffer...

cgi script or htaccess type...

we are linux /apache...

thanks for your thoughts on this one...

tedster




msg:1493098
 8:09 am on Aug 7, 2000 (gmt 0)

Hi Iggy,

Since you asked me directly, I guess I can't duck at least saying something. But I don't have much knowledge in server-side scripting, and the one guy in our company who does is on vacation.

We'll need to turn to the larger community here for input.

~Ted

sarkye




msg:1493099
 9:44 am on Nov 28, 2001 (gmt 0)

hope you don't mind if I drag this one up again...

I have a small script currently to detect either IE or NN, but I'm wondering if it's possible to modify it so that it detects IE/Mac, IE/Win, NN/Mac and NN/Win

Here's what I have already:

if (browser_type == "Microsoft Internet Explorer" && (browser_version >= 4)) {
document.write("<link REL='stylesheet' HREF='style.css' TYPE='text/css'>");
}

else if (browser_type == "Netscape" && (browser_version >= 4)) {
document.write("<link REL='stylesheet' HREF='style.css' TYPE='text/css'>");
}

Thanks for your help :)

MikeFoster




msg:1493100
 6:05 pm on Nov 28, 2001 (gmt 0)

This one [developer.netscape.com] does everything! I started with it to make my own. Just copy only the parts you want.

sarkye




msg:1493101
 9:02 pm on Nov 28, 2001 (gmt 0)

Fantastic, MikeFoster - thank you.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved