browser

How to prevent users to go in debug mode with their browser

删除回忆录丶 提交于 2020-01-17 15:17:38
问题 This might sound silly, but as a developer, I'm using the debugger in Chrome every day to test my web applications, but although these tools are valuable for us developers, it might also be used against us by users how wants to mess with our systems. You probably know that it is fairly easy, using the debugger, to re-enable a button that was previously set to disabled, or change the value of hidden tags or variables. It would then be easy to post a form that is not suppose to be sent, with

How to encode a URL for passing it as a GET parameter

你。 提交于 2020-01-17 03:35:06
问题 I load a JavaScript file which takes current page's URL as a parameter. Here is the code I use: document.write(unescape('%3Cscript src=\"' + _vis_opt_protocol + 'domain.com/js.php&a='+account_id+'&url='+encodeURIComponent(document.URL)+'&random='+Math.random()+'\" type=\"text/javascript\"%3E%3C/script%3E')); I thought encodeURIComponent will do the job of properly encoding the URL. However, while loading JS file, browsers interpret the encoded URL too. For example if the document.URL is http:

How to encode a URL for passing it as a GET parameter

冷暖自知 提交于 2020-01-17 03:34:08
问题 I load a JavaScript file which takes current page's URL as a parameter. Here is the code I use: document.write(unescape('%3Cscript src=\"' + _vis_opt_protocol + 'domain.com/js.php&a='+account_id+'&url='+encodeURIComponent(document.URL)+'&random='+Math.random()+'\" type=\"text/javascript\"%3E%3C/script%3E')); I thought encodeURIComponent will do the job of properly encoding the URL. However, while loading JS file, browsers interpret the encoded URL too. For example if the document.URL is http:

Why lose webbrowser control when adding click event handler?

自作多情 提交于 2020-01-17 03:05:27
问题 I'm using .NET visual C# 2008 and in my webbrowser, I added click event handler to capture what html tag name I've clicked. But then I lost control to the webbrowser. When I start the application, in the webbrowser, I cannot enter texts into text field in the browser. It still accepts mouse clicks to the links though. I've found few people having this issue in forums but no solution is found. What am I doing wrong? Code : using System; using System.Collections.Generic; using System

NewWindow3 event on extended WebBrowser

依然范特西╮ 提交于 2020-01-16 16:34:42
问题 I've got an extended WebBrowser control which handles the NewWindow3 event. Originally I wanted this because it exposes the Url property. What I want to happen in this NewWindow event is to cancel opening a new IE instance (so I set E.Cancel = True). Then, I want to create a new form, a new web browser control and navigate to E.Url This sort of works. Where I'm running into problems, is with some JavaScript. If I navigate to a page that needs to access it's opener (in this case, to write to a

NewWindow3 event on extended WebBrowser

好久不见. 提交于 2020-01-16 16:34:23
问题 I've got an extended WebBrowser control which handles the NewWindow3 event. Originally I wanted this because it exposes the Url property. What I want to happen in this NewWindow event is to cancel opening a new IE instance (so I set E.Cancel = True). Then, I want to create a new form, a new web browser control and navigate to E.Url This sort of works. Where I'm running into problems, is with some JavaScript. If I navigate to a page that needs to access it's opener (in this case, to write to a

NewWindow3 event on extended WebBrowser

二次信任 提交于 2020-01-16 16:32:30
问题 I've got an extended WebBrowser control which handles the NewWindow3 event. Originally I wanted this because it exposes the Url property. What I want to happen in this NewWindow event is to cancel opening a new IE instance (so I set E.Cancel = True). Then, I want to create a new form, a new web browser control and navigate to E.Url This sort of works. Where I'm running into problems, is with some JavaScript. If I navigate to a page that needs to access it's opener (in this case, to write to a

stream a pdf to a .net webbrowser object on a winform

感情迁移 提交于 2020-01-16 09:11:11
问题 I have a webbrowser object on a winform that I would like to use to display a pdf. The pdf resides on a ftp server. I have been able to show the pdf by downloading it to the disk and pointing the webbrowser object to it (navigate), but I want to stream it for security reasons. Has anyone been able to stream a pdf to a webbrowser that is located on a .Net winform? Dim URI As String = host & targetFilename Dim ftp As System.Net.FtpWebRequest = CType(FtpWebRequest.Create(URI), FtpWebRequest) ftp

HTML 5 Browser camera permission

时光怂恿深爱的人放手 提交于 2020-01-16 08:58:52
问题 I have web application that uses WEB RTC for video communication between two peers. Everything works fine, but we have one headache in production. The thing is that when browser asks for camera and microphone permission, the pop up is often ignored by users and therefor they are getting frustrated why their video is not shown. So i am wondering if there is some library that can predict where the permission pop up is shown, so i can show some arrow from my html and make it more obvious? 回答1:

HTML 5 Browser camera permission

旧街凉风 提交于 2020-01-16 08:58:07
问题 I have web application that uses WEB RTC for video communication between two peers. Everything works fine, but we have one headache in production. The thing is that when browser asks for camera and microphone permission, the pop up is often ignored by users and therefor they are getting frustrated why their video is not shown. So i am wondering if there is some library that can predict where the permission pop up is shown, so i can show some arrow from my html and make it more obvious? 回答1: