user-agent

Finding/setting css line-height defaults

僤鯓⒐⒋嵵緔 提交于 2019-12-04 02:57:24
问题 One strange thing I've noticed when trying to normalize my css across browsers is that default line-height properties for h-elements and other major tag types are different across browsers like Chrome and Firefox, and yet are not set at the user-agent level: http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/html.css http://mxr.mozilla.org/mozilla-central/source/layout/style/html.css Moreover, popular normalizers like normalize.css don't take care of

Send User-Agent through CONNECT and POST with WinHTTP?

…衆ロ難τιáo~ 提交于 2019-12-04 02:17:53
问题 I'm trying to POST to a secure site using WinHttp, and running into a problem where the User-Agent header isn't being sent along with the CONNECT. I am using a lightly-modified code sample from MSDN: HINTERNET hHttpSession = NULL; HINTERNET hConnect = NULL; HINTERNET hRequest = NULL; WINHTTP_AUTOPROXY_OPTIONS AutoProxyOptions; WINHTTP_PROXY_INFO ProxyInfo; DWORD cbProxyInfoSize = sizeof(ProxyInfo); ZeroMemory( &AutoProxyOptions, sizeof(AutoProxyOptions) ); ZeroMemory( &ProxyInfo, sizeof

Detect operating system from Google Chrome Extension

微笑、不失礼 提交于 2019-12-04 00:27:27
问题 I am developing a Chrome extension, and I need to detect which operating system Chrome is running on but i can't seem to find any info on how to do it. Please Help. Thank You. 回答1: Recently added, you can use the getPlatformInfo method in Chrome's own API: chrome.runtime.getPlatformInfo(function(info) { // Display host OS in the console console.log(info.os); }); 回答2: You would need to search for OS name and version inside window.navigator.appVersion . If you just want to know a platform, see

UrlFetch with custom user-agent string?

╄→гoц情女王★ 提交于 2019-12-04 00:04:21
Is it possible to change the user-agent string used with Google Apps Script UrlFetchApp.fetch requests? This discussion from 2010 insinuates that the UrlFetch module in Google Apps Script supports adding the User-Agent header to the optional headers collection, like the UrlFetch module of Google App Engine does. However, the GAS documentation states nothing about this. A test script I made also shows it doesn't work. Test script: function testUserAgentString(){ var page; try { page = UrlFetchApp.fetch('http://www.myuseragent.net/', {headers: {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT

JavaScript - get detailed information about the browser

北慕城南 提交于 2019-12-03 23:28:27
Basically I'm looking for something to give me easy access to information like useragentstring.com , but in JS, without me parsing the user agent and looking for each possible bit of text. The object could be something like this: browser = UserAgent.Browser; // Chrome browserVer = UserAgent.BrowserVersion; // 5.0.342.9 os = UserAgent.OperatingSystem; // Windows NT osVer = UserAgent.OperatingSystemVersion; // 6.1 layoutEng = UserAgent.LayoutEngine; // WebKit layoutEngVer = UserAgent.LayoutEngineVersion; // 533.2 Does something similar to that exist or do I have to write one myself? Writing yet

Can I get the referrer?

自闭症网瘾萝莉.ら 提交于 2019-12-03 23:27:14
I have a website on which I dynamically create Javascript code using ASP.NET handler in which I should add the referrer to a database. I want to get referrer of referrer like so: website1 website2 (where I create pixel to another site) website3 (where pixel is located) I don't have code access to website1 , on website2 I can only assign JavaScript. If I get referrer in current application state I get website2 . Is there a way to get website1 as referrer? You can pass this value along: document.referrer . That expression would need to be evaluated on website 2, not on website 3. So: // website2

PHP: detect name of android device?

吃可爱长大的小学妹 提交于 2019-12-03 21:53:21
I want to know how I can detect the Android device the visitor uses in PHP, for eg. Galaxy S. While browsing facebook from my phone, I saw: "Install Facebook on your Galaxy S and browse faster" So I viewed phpinfo(); located on my server from the same browser I used while browsing facebook and searched for "galaxy" text and got no matches. So how come it detected my device name? And how can I detect it on my PHP script? Any help would be appreciated. Found something like this in here :- http://forums.macrumors.com/showthread.php?t=205417 Check whether it's useful for you not. <?php /* detect

Mimicking iPhone user agent in Chrome? [duplicate]

 ̄綄美尐妖づ 提交于 2019-12-03 17:04:42
问题 This question already has answers here : User Agent Switcher for Chrome (6 answers) Closed 5 years ago . I'm tinkering with a phpbb mod which adds a skin for mobile phones, and to work on it in my computer I want to mimic an iphone. In Firefox I manage to do this using the "user agent switcher" extension which comes with built-in "iphone" feature: https://addons.mozilla.org/en-us/firefox/addon/user-agent-switcher/ However, in Chrome (which I prefer) I cannot make this happen. I downloaded

User Agent Switcher for Chrome

天涯浪子 提交于 2019-12-03 14:53:18
问题 I'm looking for a User Agent Switcher for Chrome. Searching the Chrome Web Store does not come up with a simple switcher. I understand I can run the browser via command line and arguments: Google Chrome: Change User Agent to Access Website. Is there a user agent switcher built in to the UI of Google Chrome? If so, how do I access it? 回答1: Chrome Developer Tools (as of version 17+) have the ability to supply custom User-Agent header Bring up the developer tools by pressing f12 Look in the

Chrome use-mobile-user-agent not working

浪尽此生 提交于 2019-12-03 14:49:46
Chrome use-mobile-user-agent not working Running chrome from command line with flag --use-mobile-user-agent does not open the browser in mobile context (user-agent). chrome --use-mobile-user-agent= true Note: passing user-agent option does work, but i feel its not the right way of doing things as chrome offers you this flag to boot in mobile context. --user-agent= Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; ar) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3 Chromium source code reading some of the chromium source code , i see the