Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
Relish
Mike
Send A Message
Rating
8.50
out of 10
( 2 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
JavaScript
Posted 134 Days Ago
360 Views
Received 2 Ratings
More Codes By This Author
Prime Number Generator
Advanced Browser And Oper...
World Of Warcraft Data Ri...
Simple Hit Counter v1.3
Simple User Authenticatio...
Articles By This Author
Introduction To PHP

Advanced Browser And Operating System Detection


Description
I wrote this a while back and will update for Vista soon.
Technical
Simply save into a file, and this will detect which browser or operating system the user is using.

So, to see if the browser is using IE:

if (isIE) {
alert("IE User :P");
}

Or for FireFox:

if (isMoz) {
alert("FireFox Yay!");
}

Windows:

if (isWin) {
alert("Windows");
}

or even:

if (isWin95) {
alert("Update, jeez!");
}

You can look through the source to see what else you can detect for now, and I will add a list soon.
Source Code
Comments
Please login to post comments.
 
Relish     Posted 131 Days Ago
 
 
I found it a lot easier to just have:

<script type="text/javascript"
src="detect.js"></script>

And through the code simply just use:

if (isIE) {
//do crap
}

It's cleaner IMHO.
 
VBAssassin     Posted 131 Days Ago
 
 
Thats quite cool. I like how many browsers it can potential detect. Nice work there.
But i feel you should have encapsulated it a lot more, you have so many global
variables and code in the main namespace (by that i mean not inside a function or
class).

I would have rated it a little higher if it was inside a class, or inside a single
function making it easy to use such as:

get_browser();
 
Relish     Posted 133 Days Ago
 
 
Lol ty :)
 
Webcopper     Posted 133 Days Ago
 
 
sweet ^^
Page 1 of 1
More "JavaScript" Source Codes By This Author
Recently Posted "JavaScript" Source Codes
Recently Rated "JavaScript" Source Codes
 
 
Part of the MyPingle Network
Development Blog :: Make A Donation :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents
Version 1.44.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved