browser-detection

Browser Detection

What's the best / simplest / most accurate way to detect the browser of a user? Ease of extendability and implementation is a plus. The less technologies used, the better. The solution can be server side, client side, or both. The results should eventually end up at the server, though. The solution can be framework agnostic. The sol...

What is better: CSS hacks or browser detection?

Commonly when I look around the Internet, I find that people are generally using CSS hacks to make their website look the same in all browsers. Personally, I have found this to be quite time consuming to find all of these hacks and test them; each change you make you have to test in 4+ browsers to make sure it didn't break anything else....

How to do browser detection with jQuery 1.3 with $.browser.msie deprecated?

How should browser detection be done now that jQuery 1.3 has deprecated (and I'm assuming removed in a future version) $.browser.msie and similar? I have used this a lot for determining which browser we are in for CSS fixes for pretty much every browser, such as: $.browser.opera $.browser.safari $.browser.mozilla ... well I think tha...

Browser detection for CSS: Use separate CSS files or inline CSS or...?

I'm wondering which is best for speed: Option 1: Loading separate CSS for each browser (separate JS file included through a <script/>): // for internet explorer 6 & 7 if ($.browser.msie) { document.write('<link rel="stylesheet" type="text/css" href="/css/styles-ie.css" />'); } // for opera if ($.browser.opera) { document.write...

Browser language: autodetect vs user select?

Hi, I am designing a localized web app. I am leaning on auto-detect browser language setting. But I notice a number of respectable sites asking the user to select a language. Is there any usability issue you know of (from actual experiences out there) with just auto-detecting user language? Thanks. ...

What is the Best way to do Browser Detection in Javascript?

In one of my Web Development classes we where asked to create a script that detects NE4,NE6+,IE4,IE6+ Browsers that display a compatable CSS script for each browser. he gave us an article to read about these and the article mentioned this site one of the students said this The best choice for javascript compatibility is to test...

Detect Browser Support for display:inline-block

How can you detect if a browser supports the CSS attribute display:inline-block? ...

What is the correct way to detect Opera using jQuery?

Amazon.com recently updated their javascript, and it's causing problems with some Opera browsers. Their browser detection code looks like so, but it's faulty: function sitbReaderIsCompatibleBrowser() { if (typeof(jQuery) == 'undefined') { return false; } else { var version = jQuery.browser.ve...

How do you detect support for VML or SVG in a browser

I'm writing a bit of javascript and need to choose between SVG or VML (or both, or something else, it's a weird world). Whilst I know that for now that only IE supports VML, I'd much rather detect functionality than platform. SVG appears to have a few properties which you can go for: window.SVGAngle for example. Is this the best way to...

Anti-aliased font in HTML page

Is there a good way to create crisp, clear, LARGE font in webpages? I need to create a tag cloud effect on my homepage with different font sizes and colours. I've got it set up in HTML/CSS but on the older browsers or OS's which don't support anti-aliasing as default it looks a bit... crappy. I've played with sIFR, which worked beautif...

How to display browser specific HTML?

I'm trying to find a way to display one link to an IE user and another link to all other browsers using javascript or conditional comments (or whatever it takes). Basically... //pseudo code <!--[if IE]> <a href"ie-only.html">click here!</a> <!--[else]> <a href"all-other-browsers.html">click here!</a> <![endif]--> I don't thin...

Mobile detection using Javascript

Is there a way to detect mobile devices using Javascript? Also, I researched that there are such an XML which contains user-agents that could help to identify the mobile handsets. Many thanks. -V2 ...

Detect IE8, IE7, Safari, FireFox with jQuery 1.3+?

I need to change a value based on each browser since they all render differently. if (navigator.appName == 'Netscape'){ top = 17; } This was working but unfortunately both Firefox and Safari show up as "Netscape" How would I use jQuery 1.3.2 to detect all these? I couldn't find any info under jquery.support now that jquery.browser ...

Website language: use browser locale or IP address

Hello! For a website we're about to implement automatic country/language selection, but still giving the user the choice to change it. First of all, if the user enters the website using a domain with a country-level TLD they will be presented the correct language by default. But the question is what should the logic be if they come fro...

PHP get_browser: how to identify ie7 versus ie6?

Is there any way to differentiate IE7 versus IE6 using PHP's get_browser() function? ...

Reliable way to sniff XMLHttpRequest (browser sniffing for AJAX requests) in ASP.NET?

I want to add an additional roadblock in my application to prevent automating it via javascript, specifically when the automated requests are being done via XMLHttpRequest from any of the popular browsers. Is there a reliable tell-tale sign of a XMLHttpRequest that I can use in ASP.NET? And I guess the other related question is, is it ...

firefox browser detection in ubuntu

I just face this problem when starting to use Ubuntu. I wonder why Request.Browser.Browser.ToLower().IndexOf("firefox") return true for firefox on windows but false for firefox on Ubuntu? ...

js browser detection for IE

Hello, My question is the folowing Is there a solid javascript code to detect if a browser is IE(I don't care about others) I found some script, but it generates an undefined error in FF. I edited my question because I found some regex serverside solution for this on this forum It's enough for now. thanks, Richard ...

Browser detection Plugin?

Hi I have a website that I made and I am planning to redo it. The current version of the site used a jquery callout plugin that did not fully work in IE6. This got me thinking about browser detection. At first I was just going to put the supported browsers on the home page but then today on Digg I saw some post about some jquery plugin...

jQuery detect IE6 using jQuery.support NOT jQuery.browser

I have found no definite way to detect IE6 using jquery.support instead of jquery.browser which is not supported anymore. Also I need to account for Quirks mode, Ugh!!! I have seen a couple of posts on Stack but they all refer to jquery.browser and the documentation for jquery.support is a little vague. Any help on this would be great ...