Welcome to WebmasterWorld Guest from 23.20.110.176

Forum Moderators: open

Message Too Old, No Replies

browser detecting javascript

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

Senior Member

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

joined:Apr 22, 2000
posts:9138
votes: 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?

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 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.

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

Junior Member

10+ Year Member

joined:Aug 1, 2000
posts:165
votes: 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...

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

Senior Member

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

joined:May 26, 2000
posts:37301
votes: 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

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

Junior Member

10+ Year Member

joined:Oct 19, 2001
posts:104
votes: 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 :)

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

Junior Member

10+ Year Member

joined:July 20, 2001
posts:137
votes: 0


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)

Junior Member

10+ Year Member

joined:Oct 19, 2001
posts:104
votes: 0


Fantastic, MikeFoster - thank you.