Welcome to WebmasterWorld Guest from 54.158.54.179

Forum Moderators: open

Message Too Old, No Replies

browser detecting javascript

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

WebmasterWorld Senior Member rcjordan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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?

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

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

10+ Year Member



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...

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

10+ Year Member



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 :)

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

10+ Year Member



This one [developer.netscape.com] does everything! I started with it to make my own. Just copy only the parts you want.
9:02 pm on Nov 28, 2001 (gmt 0)

10+ Year Member



Fantastic, MikeFoster - thank you.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month