user-agent

How can I fool a site that looks at the JavaScript object 'navigator' to see that I'm not on Windows?

我的未来我决定 提交于 2019-11-28 09:48:37
I am trying to browse a website, however, it only works under Windows and Mac because they use the navigator.platform from JavaScript to find out the architecture I am running on. Of course, they also use the browser's user agent, but that was easy to spoof. Here is the .js in question: http://pastebin.com/f56fd608d . The code responsible for browser detection is at the top. Is there any way of changing the .js file before the site runs, or something similar, so I can eliminate the check? Using the JavaScript console yields: >navigator.platform Linux i686 Evidently I changed the browser's user

Change PhoneGap / Cordova User-Agent for AJAX

六月ゝ 毕业季﹏ 提交于 2019-11-28 08:42:35
I'm using phonegap / cordova for developing an Android app. The app has to read files on a remote server. Therefore I'm using AJAX (jQuery). The problem is: The remote server redirects all connections from mobile devices to a mobile version, which doesn't work for me, so I have to change the User Agent to a desktop browser. How can I do this? I've seen a solution for iOS . Is something like this possible for Android? Edit: I found a solution myself: Just add WebSettings w = this.appView.getSettings(); w.setUserAgentString("Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like

ASP.net not generating javascript for some User Agents

别来无恙 提交于 2019-11-28 08:30:13
问题 ********************Edit 2********************** I figured out the problem... But I don't like the implications. I was testing our iPhone targeted mobile application earlier and using a plugin to mask Firefox's User Agent String as an iPhone. .Net was infact NOT generating the required code for post backs based on that piece of information alone. I do not like this however, because since the iPhone and other multimedia devices can interpret javascript, ASP.net is breaking any application that

Distinguish between iPhone web browser and iPhone app user agent

左心房为你撑大大i 提交于 2019-11-28 08:28:21
What is the best way to distinguish on a server between a request that came from an iPhone through the web browser vs through an iphone with an app written in objective c? What differences do I look for in the user agent string? I believe user agents from the Safari app start with "Mozilla", while user agents from apps start with the name of the app. Open SEO It seems that iPhone Apps using the UIWebKit HTTP request component have user agent string like the following Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0_1 like Mac OS X; fr-fr) AppleWebKit/532.9 (KHTML, like Gecko) Mobile/8A306 Mozilla/5.0

Change Phonegap User Agent

两盒软妹~` 提交于 2019-11-28 06:35:13
My Phonegap application is allowed to browse to some external sites that also use the Phonegap API. Currently I am conditionally including the Phonegap javascript based on what platform you are on (Android, iOS, etc). However, I can't tell the difference between Phonegap applications and the regular browser on a mobile device. Is there a way to change the user agent in my Phonegap app to give my server a hint about this? Most interested in the iOS solution to this. Gregor Schmidt This answer to a similar question also mentions a preference available in current Cordova versions: <preference

Change User-Agent

旧巷老猫 提交于 2019-11-28 06:26:42
问题 How can I change in my WebView the default string of User-Agent? @IBOutlet weak var myWbView: UIWebView! let myURL = NSURL(string: "http://http://web-example") let myURLRequest:NSURLRequest = NSURLRequest(URL: myURL!) myWbView.loadRequest(myURLRequest) 回答1: If you want to set User-Agent HTTP header for your request that is going to be used for Web-view loading, let userAgent = "Custom User Agent"; let myURL = NSURL(string: "http://http://web-example") let myURLRequest:NSURLRequest =

What is the User Agent string name for Microsoft Edge?

眉间皱痕 提交于 2019-11-28 06:08:40
I'm making a website and I want it to be compatible with the forthcoming Microsoft Edge when it comes out officially. To be more specific, the mobile version of it. Does anyone know what string will identify the Edge Mobile Browser (for example, "IE Mobile" identifies the mobile version of the Internet Explorer). Dave Voyles - MSFT Microsoft Edge UA string: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136 I detail why in this blog post. Neowin recently reported that Microsoft’s new browser for Windows 10, Spartan, uses the

Get Android OS version from user-agent

人走茶凉 提交于 2019-11-28 05:58:57
I've been trying to find a parser or regex that will give me the Android OS version from a user agent string. E.g. Mozilla/5.0 (Linux; U; Android 2.2.1; fr-fr; Desire HD Build/FRG83D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 Will return: 2.2.1 Can anyone help? fearphage This regular expression is a bit more "future proof" than mathepic's answer : Android (\d+(?:\.\d+)+); It allows for multiple digits in each place as well as additional periods in the version number. Android's been out 3 years and we're on 3.0. Eventually we'll get to 10.0.0. This will catch all of

What is the standard format for a browser's User-Agent string?

北城余情 提交于 2019-11-28 05:38:44
Is there an RFC, official standard, or template for creating a User Agent string? The iphone's user-agent string seems strange... Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_1_2 like Mac OS X ; en-us) AppleWebKit/528.18 ( KHTML, like Gecko ) Version/4.0 Mobile/7D11 Safari/528.16 Paulo Santos The User-Agent header is part of the RFC7231 , which is an improved version of the RFC1945 , where it states: The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of

Javascript redirect for Internet Explorer browser version user agent?

↘锁芯ラ 提交于 2019-11-28 05:33:21
问题 I found out that my javascript-intensive web site doesn't work reliably (or at all) in IE9. It works, (usually, but not always) with the compatibility mode meta tag in the header, but I just want to build a page that I know will work well in IE9 and then have the usual page redirect to it when IE9 is detected. The usual page is fine in IE 7 and 8 (and every other browser I've tried it on). Can anyone give me some javascript that will do that? Thank you! Here's my usual page: http:/