browser

how to get MAC address using any browser with javascript [duplicate]

删除回忆录丶 提交于 2019-12-24 00:23:51
问题 This question already has answers here : MAC addresses in JavaScript (6 answers) Closed 2 years ago . I have already tried java applet it gets MAC address but now i want do it using javascript I have an web app in which i want store user's MAC address using javascript. How i can find MAC address of user using any browser. 回答1: Javascript always run in a Browser Sandbox for security reason. That's why it's not possible to get hardware information about the device it's running the script except

How can we view webpages in our android application without opening browser?

主宰稳场 提交于 2019-12-24 00:23:16
问题 Hey i am developing an android application , and i want to connect to web inside that application. However i have tried WebView to someextent but its displaying file's on my directory fine but when connecting to google.com it display's an error ! Then i added this file <uses-permission android:name="android.permission.INTERNET" /> in my Manifest.xml and now the the url(google.com) is being displayed in the browser Any help how i can open the browser inside my application ? 回答1: Using webview.

How do you change Visual Studio's default web browser?

狂风中的少年 提交于 2019-12-24 00:16:38
问题 This is a for a Silverlight project that isn't anchored to an .aspx file, so right clicking, etc. is a bit out of the question. Any ideas? Edit: Add an .html file, then click it. Really dumb. Last time I ask a question at three in the morning. 回答1: Why is right-clicking out of the question? With any HTML document at least (even in Miscellaneous Files ) you can right-click on it, select Browse With... , select the browser, and click on Set as Default . If the browser doesn't appear in the list

WPF WebBrowser events for HTTP errors?

人走茶凉 提交于 2019-12-24 00:06:55
问题 I have a WPF application and I'm using the WebBrowser control to display some content from a public website. Sometimes in weird edge cases when the network connectivity is flakey, the web browser will show the "This program cannot display the webpage" error page. Is there some way to listen to the WebBrowser to detect when this occurs, so I can load a placeholder? 回答1: You could try using the NavigationService from System.Windows.Controls.Frame as indicated in this MSDN forum post. The

WebClient website login

回眸只為那壹抹淺笑 提交于 2019-12-23 23:35:53
问题 I have difficulties logging in to a webpage (http://hurt.prosto.pl); all the time it returns to the login page source... Any idea how to fix it? var loginData = new NameValueCollection(); loginData.Add("username", username); loginData.Add("password", password); var client = new CookieAwareWebClient(); client.BaseAddress = @"http://hurt.prosto.pl/accounts/login/?next=/hurt/"; client.UploadValues("http://hurt.prosto.pl/accounts/login/?next=/hurt/", "POST", loginData); // now you are logged in

javascript in browser: asynchronous tasks execution model

青春壹個敷衍的年華 提交于 2019-12-23 22:13:19
问题 I'm trying to wrap my head around and understand how javascript async works in single threaded browser environment. As asynchronous we can treat both timers and xhr requests. Now suppose I have something like below function doStuff() { for(var i=0; i<100000000; i++) { // do something to make proc busy if(i%1000 === 0) { console.log('in for loop'); } } } setTimeout(function() { console.log('timed out') }, 2); doStuff(); doStuff(); doStuff(); Timer is set to really small value (2ms), so I

How to switch Firefox profile with Selenium - without instantiating a new driver?

久未见 提交于 2019-12-23 21:21:32
问题 Trying to find a way to switch the active profile in a Selenium Firefox driver. This question about multiple Firefox profiles states that creating and using multiple profiles is possible. However, it would be better if there were some way to switch the active Firefox profile within the driver session - instead of starting a new one. How can I switch the active Firefox profile with Selenium? Thanks very much! 回答1: You can't. Selenium does not let you change Firefox profiles, and I'm pretty

Is it possible to direct which elements of a page are painted first by the browser?

一曲冷凌霜 提交于 2019-12-23 20:39:00
问题 I wanted to know if there was any way to control browser painting, for example I'd like to load elements at the top of the page first so users can see content straightaway. The elements at the bottom of the page can load last as the user will not see them until they scroll down. I'm looking to optimize my site which currently has a 6 second load time and I'd like to get it down to 1 second. This is mostly being caused by JS and images. I know that reducing both these will mean I wont need to

Browser behavior on 403 Forbidden error

余生长醉 提交于 2019-12-23 20:26:37
问题 My server returns a 403 forbidden error when a user tries to access a resource that they do not have access to. Along with the header the server also writes a small message describing the error. In Firefox the error message gets displayed nicely and the user knows what's going on. In Internet Explorer the message is hidden and replaced with the 403 Forbidden standard error page. Are there any specific rules that allow me to display an error message across all browsers while still setting the

Can I control the web browser's loading icon?

拜拜、爱过 提交于 2019-12-23 20:26:36
问题 Can I control the browser's loading state with JavaScript? I.e., I want the browser to display its native "loading" animation, not my own loading icon in the page, but the one that appears instead of the favicon while the browser is loading the page. 回答1: You can make the browser load some page (in an invisible iframe for instance) 回答2: I once built a page which would get into an infinite loop of making AJAX requests as soon as the page loaded. It would make an ajax request, update something