What is the most reliable way to determine whether the device accessing a site is a mobile device? There should also be a way to distinguish whether the device is a tablet or smartphone. A tablet can be 10 inches and therefore is capable of displaying a normal web page whereas a smartphone cannot and I want to deliver content specific to smartphones. I guess really what I should be checking is the screen resolution but I wasn't able to find a reliable way of doing that. The screen resolution should be in pixels and not pixels per inch. So 320x480 or 480x600 and 600x800 would be considered by my site to be mobile. But something with 1024x768 probably should be considered a desktop.
相关问题
- Angular RxJS mergeMap types
- Google Apps Script: testing doPost() with cURL
- How to instantiate Http service in main.ts manuall
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Ionic Spinner not showing up
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Is a unicode user agent legal inside an HTTP heade
- is there a “rails” way to redirect if mobile brows
- git: retry if http request failed
- Flutter - http.get fails on macos build target: Co
- C# HttpClient.SendAsync always returns 404 but URL
- Response body is null, status is 200
- Returning plain text or other arbitary file in ASP
so here we go:
http://detectmobilebrowsers.com/ - here you have tool for detecting if your visitor is on mobile device. But ...
http://modernizr.com/docs/#s2 - here you have tool to detect features. It's way better to make some fallback by features than by mobile/desktop
http://www.w3.org/TR/css3-mediaqueries/ - here you have built in media queries that you can use to detect screen size. You can check that in action for example here: https://github.com/twitter/bootstrap/blob/master/less/responsive.less