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
0
votes
1 answer

Set correct css transform based on browser

I'm trying to add the correct css "transform" based on browser here is what I have tried but its not working: if ($.browser.msie) { var BroTrans = 'transform'; } else if ($.browser.webkit) { var BroTrans = '-webkit-transform'; } else if(…
Anna Riekic
  • 728
  • 1
  • 13
  • 30
0
votes
5 answers

Detecting Android Browser (from v. 1 to 2.3 firmware) in PHP

I need to detect if the browser is Android (only from 1 to version 2.3), would this work? if(preg_match('/Android [1-2.3]/', $_SERVER['HTTP_USER_AGENT'])) { echo 'something'; }
MultiformeIngegno
  • 6,959
  • 15
  • 60
  • 119
0
votes
1 answer

Responsive links in HTML Email directing customers to mobile site or desktop site

We recently had a mobile site built which was great but when we send out our html emails I'm having to use media queries on the links to send customers to the desktop site or mobile site as the URLs are different Eg. m.mobilesite.com and…
Damodog
  • 344
  • 1
  • 5
  • 15
0
votes
6 answers

Browser Detection with Javascript

Reasoning for this Question I am aware that browser detection can never be 100% reliable as the User Agent header can always be forged, however, I am not bothered by this. Although there are many questions on this topic, they all seem to be quite…
Ben Carey
  • 16,540
  • 19
  • 87
  • 169
0
votes
1 answer

Requests coming from IPad "sometimes" come as Mozilla 0

Now, this sounds very strange but we have an application which supports only particular browsers and in order to keep a close look on alll the requests coming, we have a log server which logs all the detailed information about incoming request's…
Lost
  • 12,007
  • 32
  • 121
  • 193
0
votes
1 answer

How to test for Mobile Safari that supports upload other than version string?

iOS 6 now supports uploading images via the tag. Is there any way to check for this support other than getting the user agent and checking whether the Safari version is 6.0 or greater? That seems kinda kludgy and prone to…
0
votes
1 answer

How can i detect whether browser in use is the latest one

I am able to detect browser and its version using javascript. Check this link - Quirksmode.org Is there a way to check whether this browser is the latest one. That is at the time of submitting this question i am having FireFox 15, Chrome 22 etc. In…
IrfanRaza
  • 3,030
  • 17
  • 64
  • 89
0
votes
1 answer

View Desktop version on mobile site?

I have my main site redirect to a mobile version if your view it from you mobile device, i wanted to use media queries but that was not an option for this site. On the mobile version i wanted to implement a "View Desktop Version". However i am…
0
votes
2 answers

Detecting "dumb" phones using jQuery/JavaScript?

I can't figure out how to detect a "dumb" phone browser using jQuery/JavaScript. I have a desktop/tablet, a smartphone, and a dumbphone version of my website. The smartphone version of the site is too heavy and slow for dumb phones so I want to…
Propeller
  • 2,465
  • 6
  • 35
  • 49
0
votes
3 answers

How can I detect mobile browsers without checking HTTP headers?

Before telling me that the question have been asked earlier only with after reading my title, read further. I would like to know the best way to detect mobile browser without sniffing the headers for the simple reason that this can be modified…
Cybrix
  • 3,248
  • 5
  • 42
  • 61
0
votes
2 answers

Browser detection using Chrome

I have this code:

This tutorial is for Google Chrome users, why would you want to read it?