browser-detection

The best browser detection solution in ASP.NET 4.0

冷暖自知 提交于 2019-12-30 00:53:35
问题 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 find up-to-date files. But I found quite fresh browscap.ini from http://browsers.garykeith.com/downloads.asp. My first priority is to exclude common crawlers from the visitor stats. The second priority is to detect browser and os with correct

The best browser detection solution in ASP.NET 4.0

风格不统一 提交于 2019-12-30 00:53:04
问题 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 find up-to-date files. But I found quite fresh browscap.ini from http://browsers.garykeith.com/downloads.asp. My first priority is to exclude common crawlers from the visitor stats. The second priority is to detect browser and os with correct

I need an easy way to detect CSS3 media query support using jquery

老子叫甜甜 提交于 2019-12-28 23:38:52
问题 I need a quick and dirty way to detect media query support using jquery. I defined a function as follows: function mediaQueriesEnabled () { var v = parseFloat($.browser.version); if ($.browser.msie) { if (v < 9) return (false); } return (true); } Can someone help me fix this up a bit? Looking at this page: http://caniuse.com/css-mediaqueries I realized that there are some complexities here. For example, when I test my version of safari, I get "534.57.2". I want to avoid installing modernizr

I need an easy way to detect CSS3 media query support using jquery

拈花ヽ惹草 提交于 2019-12-28 23:38:52
问题 I need a quick and dirty way to detect media query support using jquery. I defined a function as follows: function mediaQueriesEnabled () { var v = parseFloat($.browser.version); if ($.browser.msie) { if (v < 9) return (false); } return (true); } Can someone help me fix this up a bit? Looking at this page: http://caniuse.com/css-mediaqueries I realized that there are some complexities here. For example, when I test my version of safari, I get "534.57.2". I want to avoid installing modernizr

Reliable Way to Detect Desktop vs. Mobile Browser [duplicate]

天大地大妈咪最大 提交于 2019-12-28 11:46:46
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: What is the Best way to do Browser Detection in Javascript? I'd like to essentially do the following (in JavaScript or PHP): if (desktop browser) { do x; } else { // mobile browser do not do x; } It is known that using a browser detection method is not recommended. A better solution is using a capability testing. My question is, with mobile browsers become smarter and as powerful as the desktop version, what

Android phone or Android tablet detection by http headers

无人久伴 提交于 2019-12-25 18:47:31
问题 Is there a way to detect whether user is accessing your website from android powered tablet or phone on the server side? I don't own any android devices, so it's not possible for me to test what kind of headers those devices send. In my research I found: - many ways to detect it using javascript. But thats (IMHO) not the best moment, when you decide what web version should be sent to client. I prefer to server each version based on http headers sent by client. - database of http headers

Browser detection using Angular

坚强是说给别人听的谎言 提交于 2019-12-25 09:30:15
问题 I have a requirement in my project to show outdated browser message when user uses old browser. I am using angular 1.5.5. I tried with angular-bowser module which works on angular supported browser, but the problem comes with old versions like IE8, which doesn't support my angular version . So angular-bowser module doesn't work . Can somebody let me know about any other ways or some library or anything in that matter that can help? 回答1: because angularjs doesn't just depend on angular modules

detecting device and OS type using mobile detect js

无人久伴 提交于 2019-12-25 03:24:28
问题 I am trying to use a device and OS detection script and came across with this mobile detect js plugin. It seems pretty clean yet quite confusing. GITHUB LINK and DOC LINK It seems the documentation is not thorough and I am finding a bit confusing on how to create special cases. For example, what I am trying to do is to find whether user is visiting website using mobile or tablet and after that check is done the next step is to find the OS of the device. function deviceDetectionScript() { var

Change link destination based on whether user has mac or PC

橙三吉。 提交于 2019-12-25 00:37:54
问题 Is it possible to change the destination of a link based on whether the user has a mac or a PC using javascript? To give an example: The Apple website allows download of Quicktime but it "knows" whether you are using a mac or a pc and directs you to the relevant page. Background/Reason for doing this: I have built a website for someone and they have a number of audio and video files on there. Ideally they want it so that if the user is on a mac it will download a quicktime version of the file

the best way to detect browser in js

吃可爱长大的小学妹 提交于 2019-12-23 11:55:12
问题 There are lots of ways for browser detecting in JavaScript. As far as i know, using navigator.userAgent or detecting features (like XMLHttpRequest ) and so on. Can anybody tell me which way is the best and most effective? 回答1: If you really need to know what browser they're using, you mostly have to look at the userAgent string (although you can sometimes infer the browser by looking for a couple of obscure features). Just be aware that some browsers let the user change that and lie to you. :