Questions tagged [browser-feature-detection]

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

Feature detection is the practice in web development of determining whether a browser or device supports a certain feature, so as to provide fallbacks for older browsers or allow enhanced functionality in more capable modern browsers.

160 questions
1
vote
1 answer

How to Unit Test a Feature Testing Function

I am curious if there is a best practice (if any at all) with trying to unit test a feature test. For example, if I have a function called isStyleSupported that detects if a CSS property is supported in the current browser, how can I reliably unit…
1
vote
1 answer

how to test if keyframes is supported or not using Modernizr?

I would like to test if the browser supports keyframes or not. So I found this . But I'm really confused how to use? Modernizr.addTest("keyframes", function(){ //your test code without adding a support class || this will be done by Modernizr …
Navin Rauniyar
  • 10,127
  • 14
  • 45
  • 68
1
vote
3 answers

Feature detection for jquery 1.4

How would I go about doing a detect to see if the browser is either firefox, ie (but not ie6), opera, chrome or safari by using feature detection?
Colin
  • 2,442
  • 5
  • 24
  • 30
1
vote
1 answer

Soundcloud: Detect missing localStorage support and inform the user

Recently, I had trouble accessing the Next Soundcloud. No matter which url I tried, the general error page appeared, telling me something went wrong and recommending modern browsers. The browser console said that the app failed when accessing…
1
vote
2 answers

Detect Windows 8 Mobile?

I was wondering if this can detect the windows 8 mobile! Having said that IE10 dropped conditional comments, did they implemented same in mobile as well?
absqueued
  • 3,013
  • 3
  • 21
  • 43
1
vote
1 answer

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox?

The current version of Mozilla Firefox is 23.0.1, this version does not support play MP3 shoutcast streams from a TCP port different to 80 (most common is 8000 for Shoutcast 1.9.8). I use Flash when MP3 support is not available in HTML5 audio, the…
Jose Nobile
  • 3,243
  • 4
  • 23
  • 30
1
vote
1 answer

How to feature test canvas blend modes using globalCompositeOperation

So, according to this article, you can feature test for canvas blend modes using: Modernizr.addTest('canvasblending', function () { if (Modernizr.canvas === false) return false; var ctx = document.createElement('canvas').getContext('2d'); …
kalley
  • 18,072
  • 2
  • 39
  • 36
1
vote
0 answers

Browser History handling different between browsers / JavaScript browser feature detection

I see there is a different handling of history browsing in Chrome and Safari compared to Firefox and IE. When I try to go to a page that protected by an Access Manager, it gets redirected to the Access Manager for authentication. If I click the back…
1
vote
1 answer

Ace and IE: editable content cutting off at 2nd line of code

Edit SOLVED: Initially I got under the impression that Ace will be completely unusable due to editable code cutting off on 2nd line. So I thought 'let's not even load it in IE'. Turns our the bug was fixed, Ace works just fine in 9 (or close enough,…
vector
  • 7,334
  • 8
  • 52
  • 80
1
vote
1 answer

soundmanager2: how to determine whether the volume attribute is changeable

I'm using the soundmanager2 library (http://www.schillmania.com/projects/soundmanager2) to provide crossbrowser audio support, which works great. But IOS devices don't allow the HTML5 audio volume property to be set. So I'd like to detect whether…
wdspkr
  • 636
  • 6
  • 13
1
vote
0 answers

How could I feature check file downloads in a browser

Objective Remove the display of a download button if the browser does not support downloading files. Context I've got this page that enables the functionality of playing and/or downloading a podcast. The page works perfectly except when on iOS…
Josua Pedersen
  • 620
  • 1
  • 6
  • 13
1
vote
1 answer

How to diagnose what feature that is failing for a particular javascript?

I'd like to leverage a (to me) complicated Javascript, Photoswipe. The author is clear that they don't support IE 7, and although the demo site does function to some degree in IE 7, the instance my team built does not. Rather than try to modify the…
0
votes
1 answer

Detecting touch on Blackberry phones

I am developing a webapp that will be deployed on various devices, ranging from desktops, to Android mobiles, to Blackberry mobiles. Having to support such different devices, two different interfaces exist: touch and not touch. The problem is that…
Andrea
  • 20,253
  • 23
  • 114
  • 183
0
votes
1 answer

How to make a jquery plugin, which is written by someone else, work in all the browers it could actually work?

How do I use feature detection to make a plugin, which was written by someone else, to work on all those browsers where it could actually work/is supported. The plugin's documentation says it is supported in IE 8 but it doesn't actually work. I know…
Sandeepan Nath
  • 9,966
  • 17
  • 86
  • 144
0
votes
1 answer

Test whether a device has Flash enabled, Modernizr style

Is there a way to test whether a device supports Flash, similar to the way http://www.modernizr.com can feature-detect browsers and add a class to the body?
SparrwHawk
  • 13,581
  • 22
  • 61
  • 91