To detect user browser information we use the navigator. userAgent property. And then we match with the browser name to identify the user browser. Now call this JS function on page load, and this will display the user browser name on page load.
Modernizr is a library that does feature detection. You can either use the library as is and then query it for the features you want or you can look at how it works for the particular features you want to detect and copy that into your own code.
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 will tell me that a feature exists, but it won't tell me if it's below some performance threshold.
Detecting IE8 would work for IE8 users, but it won't work for slow mobile devices, tablets, and computers running old versions of FF, Safari, mobile Opera, etc.
What are effective ways to temper or disable slow features without penalizing modern browser users?
Are the better methods than time-stamping code execution blocks?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With