browser-detection

using modernizr to determine if multiple window open is supported

两盒软妹~` 提交于 2019-12-13 15:40:22
问题 the problem I've encountered is documented here. window.open behaviour in chrome tabs/windows where you can not open multiple windows via javascript in chrome. I would like to open the multiple windows if it is supported, if it is not supported I will simply return a list of links. is there a way using modernizr or something besides browser sniffing that I can determine if the behavior is supported? 回答1: This ability to open multiple windows various widely between browser and even by browser

How to detect touch device browsers vs desktop using javascript?

纵饮孤独 提交于 2019-12-12 18:25:10
问题 What is the code to detect touch devices (smartphones and tablets) vs desktops browsers using userAgent.match and return a boolean variable (for example 'isipad')? I need to test this against Android and Apple devices mainly. If the device browser is Android or Apple, return isipad = false. Else, return isipad = true. So far I went about it like this (for iDevice browser detection) : if( navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) ||navigator.userAgent.match(

Is there a site which shows peoples User-Agent without cutting off long ones?

◇◆丶佛笑我妖孽 提交于 2019-12-12 18:09:31
问题 Basically, I know of this website http://www.whatsmyuseragent.com but it truncates the user-agents it gathers to 150 chrs. I also know of http://botsvsbrowsers.com but that site (although better) truncates to 200 chrs. I just want a website similar to these ones (any site that shows other users user-agents) but allows for at least 300 chrs or does not truncate them! Also, if you don't know weather the site you have in mind truncates the User-Agent, that's ok. As long as it's a site that lists

Regex to detect IE 5, 6, 7 and 8 but no others

落爺英雄遲暮 提交于 2019-12-12 12:18:08
问题 I've put together this regex which should only return a match where the user agent string is IE 5, 6, 7 and 8. Obviously one of the main goals here is to avoid the confusing IE11 user agent string.. Is this Regex valid (have i missed something)? .*MSIE [5-8]\b((?!Trident/4.0)).* UPDATE The below matches all user agent strings for 5, 6, 7 and 8. And none of 9, 10. It does however match one for IE11, returned from .Net using Request.UserAgent 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3;

Why am I getting these strange results when looking at browser capabilities?

 ̄綄美尐妖づ 提交于 2019-12-12 11:04:45
问题 I am currently looking into browser capabilities and am trying to test the browser definition files that come with .NET 4.0. To do this I am using an add-on for Firefox to change the user agent and I have a simple page which reports on the following: Request.UserAgent Request.Browser.Id Request.Browser.Browser Request.Browser.MajorVersion Request.Browser.MinorVersion Request.Browser.Platform Request.Browser.IsMobileDevice Request.Browser.MobileDeviceManufacturer Request.Browser

mobile browser device detection in .NET [closed]

无人久伴 提交于 2019-12-12 07:17:10
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm just starting to create my first mobile version of a desktop website that was written in WebForms. My current question has to do

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

情到浓时终转凉″ 提交于 2019-12-11 19:17:10
问题 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'; } 回答1: Following Regex can match exactly Android [1-2.3] . Android ([1](?:\.[0-9])?|[2](?:\.[0-3])?$) For MSIE [6-8] Android [1-2.3] MSIE [6-8] Android ([1](?:\.[0-9])?|[2](?:\.[0-3])?)$ Running regex here 回答2: I don't know really know what the UserAgents for those devices look like, but the pattern you have is not

Detect Desktop and redirect..?

做~自己de王妃 提交于 2019-12-11 04:14:10
问题 I want to redirect all the users to desktop site who try to browse mobile site in there desktop browsers ..!! i'm currently using <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/android|avantgo|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso

Browser-sniffing alternative for bugs/misbehaviors (NOT lack of features)

一个人想着一个人 提交于 2019-12-11 03:20:37
问题 Ok we all know that browser sniffing is bad. I'm not looking to rehash the entire debate here, and SO isn't the right forum for that anyway. I'm looking for a solution to a problem that the proposed alternative of feature-detection doesn't seem to address. In my particular case it was triggered by code like the following: <form name="something" method="POST"> <input name="input1"><input name="input2"> <!-- etc --> <input id="mysubmit" type="submit" value="Submit me"> </form> <!-- during

How to find page width in Opera 12 (for Desktop Windows)?

情到浓时终转凉″ 提交于 2019-12-11 02:16:32
问题 I want to access full page width & height in Opera. Note I am not asking about Viewport's height or width, I want page's/document's width & height. I am using Opera 12.12 I have tried the following: document.body.scrollWidth/Height document.body.offsetWidth/Height window.innerWidth/Height document.body.clientWidth/Height And all of them gives viewport's width/height. Please use the following link: http://jsfiddle.net/RQhYR/ Or use the following HTML Page <!DOCTYPE HTML PUBLIC "-//W3C//DTD