user-agent

does NSURLSession send user-agent automatically

旧巷老猫 提交于 2020-01-01 03:39:07
问题 Does NSURLSession send user-agent automatically when user WatchKit 2.0, iOS 9.0? Is there a way to verify this within the WatchKit app? 回答1: Yes, a user agent is automatically provided as part of the default session configuration. The default NSURLSession request header User-Agent field includes the Bundle Name ( CFBundleName ) and the Build Number ( CFBundleVersion ) of your watchOS app extension: $(CFBundleName)/$(CFBundleVersion) CFNetwork/808.3 Darwin/16.3.0 Notice that your app's Version

How to handle mobile devices in Zend Framework?

好久不见. 提交于 2020-01-01 03:18:07
问题 I've taken over a nightmare of a project! I'm moving a very poorly written site and moving it slowly into a Zend Framework application. Unfortunately I have no time to do the remedial work to make this even bearable (maybe a model or two). I have now been told that it is soon to have mobile version of the site and the proposal has been to clone the old site and work with that. In an attempt to not work on different versions of the same crap and buy myself some time I proposed that the ZF site

redirect PS3 via user agent

我的未来我决定 提交于 2019-12-31 07:42:26
问题 I want users to be redirected to a different webpage if they are using a PS3 here is the code I have been trying to use <script language=javascript> <!-- if ((navigator.userAgent.match(/iMozilla/i)) || (navigator.userAgent.match(/iPLAYSTATION 3/i))) { location.replace("http://example.com"); } --> </script> A list of the user agents for the PS3 can be found here http://www.useragentstring.com/pages/Playstation%203/ I cant seem to get it to work so what am I doing wrong? 回答1: You could try

redirect PS3 via user agent

青春壹個敷衍的年華 提交于 2019-12-31 07:41:28
问题 I want users to be redirected to a different webpage if they are using a PS3 here is the code I have been trying to use <script language=javascript> <!-- if ((navigator.userAgent.match(/iMozilla/i)) || (navigator.userAgent.match(/iPLAYSTATION 3/i))) { location.replace("http://example.com"); } --> </script> A list of the user agents for the PS3 can be found here http://www.useragentstring.com/pages/Playstation%203/ I cant seem to get it to work so what am I doing wrong? 回答1: You could try

What is all the browser agent stuff?

女生的网名这么多〃 提交于 2019-12-31 04:37:11
问题 I am new to ASP.NET and wanted to capture details about people on my site. So I capture the Request.UserAgent attributes to file. Can anyone explain how to deconstruct these so I know what they mean? I am actually stumped by some of the user agents I see. Examples: IE2.0d; WinNT: Mozilla/1.22 (compatible; MSIE 2.0d; Windows NT) : Never heard of IE2.0, so is this spoofed for scanning my site, and why? Also, how is IE related to Mozilla in this case? IE6.0; WinXP: Mozilla/4.0 (compatible; MSIE

Check if iOS version is 3.0 or higher with PHP or Javascript

烂漫一生 提交于 2019-12-31 04:07:10
问题 I need to check if an iOS device visiting my Website has iOS 3.0 or higher installed. Can I do that? 回答1: Bit of an older question, but I believe none of the answers currently given answer the question appropriately. If you want to do something like if(iOS_version > 3){ // Open something } Then I believe you are looking for if(/(iPhone|iPad|iPod)\sOS\s3/.test(navigator.userAgent)) { // use apple maps } Where s3 is looking for iOS3. Change s3 to s9 to check for iOS9 回答2: If you wish to check

Get IE 11 build number from javascript

对着背影说爱祢 提交于 2019-12-30 17:32:29
问题 TL;DR - How do I get the build number of IE 11 in javascript? I had a bug that was fixed at some point between versions 11.0.1 and 11.0.7. I'd like to know the percentage of users that are experiencing the issue. Basicly I would want to get this number: 回答1: I don't think this is possible using just JavaScript. Microsoft is trying to hide the fact that IE11 actually is an Internet Explorer, see http://www.nczonline.net/blog/2013/07/02/internet-explorer-11-dont-call-me-ie/. Therefore, even the

Fake User Agent for iframe

耗尽温柔 提交于 2019-12-30 06:03:53
问题 I'm new to Javascript. I have found this code to change user agent using Javascript. var __originalNavigator = navigator; navigator = new Object(); navigator.__defineGetter__('userAgent', function () { return 'Custom'; }); var iframe='<iframe id="frame" name="widget" src ="http://www.useragentstring.com/" width="100%" height="400" marginheight="0" marginwidth="0" frameborder="no" scrolling="no"></iframe>'; document.write("User-agent header sent: " + navigator.userAgent + iframe); This code

What UserAgent is reported by the WebBrowser control?

穿精又带淫゛_ 提交于 2019-12-30 01:29:13
问题 Just wondering what browser type the VB.NET reads as when it visits a webpage. For instance on my website it shows a break down of all the different browsers that accessed my site. 回答1: You don't provide much context to your question, but I assume that you're talking about the User Agent string that's sent when you use the WebBrowser control built into the .NET Framework. Because that control just uses Internet Explorer to render the page, you'll see a User Agent string very similar to what

Is the User-Agent line in robots.txt an exact match or a substring match?

瘦欲@ 提交于 2019-12-29 08:49:14
问题 When a crawler reads the User-Agent line of a robots.txt file, does it attempt to match it exactly to its own User-Agent or does it attempt to match it as a substring of its User-Agent? Everything I have read does not explicitly answer this question. According to another StackOverflow thread it is an exact match. However, the RFC draft makes me believe that it is a substring match. For example, User-Agent: Google will match "Googlebot" and "Googlebot-News". Here is the relevant quotation from