Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Browser Detector Script
Old 10-18-2008, 09:30 AM Browser Detector Script
Novice Talker

Posts: 7
Trades: 0
Anyone know where i can get a script, which detects someone's browser - if they aren't using Firefox, Safari or Latest IE then a pop up box comes with a message.

Anyone know a script that can do that?
Makaaveli is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-18-2008, 09:44 AM Re: Browser Detector Script
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Google
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-18-2008, 10:54 AM Re: Browser Detector Script
Novice Talker

Posts: 7
Trades: 0
Chris i tried that before, i found some scripts but they weren't what i was looking for. Most of them are for older versions, i'm looking for something specific as mentioned in my post above.
Makaaveli is offline
Reply With Quote
View Public Profile
 
Old 10-18-2008, 11:35 AM Re: Browser Detector Script
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
The methods to get the information out of the browsers is the same as it always has been, and the information is in the same format. You have to decode the version string and/or the user agent string to achieve whatever results you need.

However, having said that, "nagging" users about their choice of browser, or the browser they have to use for whatever reason, is NOT the best way to endear you and your site to the visitor. The days of "Best viewed in Internet Exploder at 1024x768" are thankfully well and truly behind us (or should be)
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-18-2008, 04:32 PM Re: Browser Detector Script
Extreme Talker

Posts: 160
Trades: 0
Instead of detecting specific browsers, and there are loads :

useragent listing

it would be better to detect whether a visiting useragent supports your site's functionality. So instead of examining a particular useragent using something like navigator.userAgent or the HTTP_USER_AGENT server variable ( which can be spoofed anyway ) check whether a property is supported prior to using it and branch to alternative content as appropriate.

For example :

Code:
if(document.getElementById)
{
do this...
}
else
{
do this instead...
}
This way you don't need to keep revisiting your code everytime a new browser or browser version gets released.
ElectricSheep is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Browser Detector Script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22652 seconds with 12 queries