Questions tagged [browser-detection]

Detecting the type and version of the browser the user uses to view the webpage.

Detecting the type and version of the browser the user uses to view the webpage. Most of the time the decision is based on the User-agent string or the existence of some proprietary properties.

In most cases, it is considered bad practice. Feature detection is to be used instead.

520 questions
21
votes
1 answer

How to find out about the User Agent in GWT

I am trying to write browser specific code. Is there a GWT API to find out which browser the client is using?
Kasturi
  • 3,335
  • 3
  • 28
  • 42
21
votes
10 answers

Show a message if the browser is not internet explorer 9 or greater

I would like to show my users a bar that looks like this, if: Browser is not IE; or Browser is IE but is version 8 or earlier (Note that the screenshot is just for illustration - IE 9 is supported for my site.) I found this nice jQuery plugin,…
Luis Valencia
  • 32,619
  • 93
  • 286
  • 506
20
votes
5 answers

The best browser detection solution in ASP.NET 4.0

I googled this topic and I came across with three different ways to configure browser capabilities: browscap.ini, browserCaps element in web.config and .browser files in App_Browsers. I thought .browser files is the latest way, but I don't seem to…
Mike Koder
  • 1,898
  • 1
  • 17
  • 27
20
votes
9 answers

How to write specific CSS for mozilla, chrome and IE

What would be the CSS conditional statement you can use to include specific CSS for IE, Mozilla, Chrome. If IE #container { top: 5px; } If Mozilla #container { top: 7px; } If Chrome #container { top: 9px; } What would be the…
Sussagittikasusa
  • 2,525
  • 9
  • 33
  • 47
20
votes
3 answers

Detecting IE using jQuery

$(window).load(function () { if($.browser.msie && $.browser.version=="6.0") { // do stuff } }); Just realized that $.browser has been depreciated in 1.3. What is the new method for detecting IE, specially IE6.
eozzy
  • 66,048
  • 104
  • 272
  • 428
19
votes
3 answers

jQuery 1.9 browser detection

In earlier versions, I used to test if I should be triggering popstate manually on page load, because Chrome triggers it right after load, and Firefox and IE do not. if ($.browser.mozilla || $.browser.msie) { …
bevacqua
  • 47,502
  • 56
  • 171
  • 285
18
votes
2 answers

How do I use browser fingerprint in my website?

I want to identify users accessing my API even if they clear the cookies or localstorage wherever I am storing the current session information. I see that browser fingerprinting is one of the ways to achieve this up to some accuracy. I am working on…
Ashish Ranjan
  • 12,760
  • 5
  • 27
  • 51
17
votes
7 answers

Mobile browser detection?

We are looking for a way to determine if a user is using a mobile browser. We need to do that in PHP, by parsing the user agent string. I know this method has got many caveats, but we really need to do it that way. Do you have any suggestion? A good…
ItalyPaleAle
  • 7,185
  • 6
  • 42
  • 69
17
votes
3 answers

How do I detect availability of tel: uri scheme in a web app?

I'm looking to use the tel: uri scheme (rfc3966) to make phone numbers linkable on mobile devices in a web application, but I'd prefer to not link them on devices that can't handle the tel: scheme - desktops, or mobile devices without phone…
Korny
  • 1,988
  • 1
  • 18
  • 16
17
votes
5 answers

Mobile Device Browser File vs. WURFL for ASP.NET

I am working on a commercial web application that has a separate mobile browser version intended for the more capable devices (BlackBerry, iPhone, Android, etc). I don't want to do simple User Agent contains style logic and was looking at the…
Kevin Hakanson
  • 41,386
  • 23
  • 126
  • 155
17
votes
3 answers

How can I "performance detect" browsers

Some mobile browsers and IE8 javascript is not just a little bit slower, it's many times 10x slower! There are lots of things that pass feature detection tests (js css manipulations, etc) but are so slow they degrade the user experience. Modernizr…
17
votes
10 answers

How to detect IE 11 with javascript in Asp.net

Hello I want to detect the Browser , IE 8 or more will be appropriate for me. For this i used following code but it fails for IE 11 . For other its detecting properly. function getInternetExplorerVersion() { var rv = -1; // Return value assumes…
16
votes
3 answers

mobile browser device detection in .NET

I'm just starting to create my first mobile version of a desktop website that was written in WebForms. My current question has to do with mobile device/browser detection. What I'm trying to determine is a) If your device is mobile b) What OS…
TedH
  • 191
  • 1
  • 4
15
votes
3 answers

Disable Facebook mobile browser detection?

Does anyone know of a way to disable the mobile browser detection and redirect feature of Facebook via querystring parameters? For example, if I go to www.facebook.com/CraigslistGenie in a mobile browser, I get redirected to…
user330468
  • 381
  • 2
  • 4
  • 6
15
votes
9 answers

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')…
Lisa