browser

Is loading scripts or other resources via HTTPS on a HTTP page problematic?

感情迁移 提交于 2019-12-22 11:22:10
问题 I'm aware of protocol-relative URLs, which are usually the right solution for serving scripts or other resources on pages that may be loaded using HTTP or HTTPS. However, I have a script that I would like to always serve via HTTPS, even when the page it's being loaded onto is served via HTTP. Leaving the obvious potential security issues around mixing HTTP and HTTPS content aside (namely, that a MITM attack on some script served via HTTP could theoretically be used to inject exploit code used

check if HTMLElement exists in Document in webbrowser control (vb.net)

穿精又带淫゛_ 提交于 2019-12-22 11:16:41
问题 I am trying to get the HTML inside a HTMLElement which has an id "block". I have tried: If webbrowser1.document.getelementbyid("block") isnot nothing then MsgBox(webbrowser1.document.getelementbyid("block").innerHTML) end if But it keep throwing a NullReferenceException and tells me to check if it null/nothing which is what I'm doing. So how do I check if an element in a HTMLdocument with a certain ID exists? 回答1: What's likely happening here is that webbrowser1.document is Nothing and that

How to know when HTTP-server is done sending data

别来无恙 提交于 2019-12-22 10:58:16
问题 I'm working on a browser/proxy oriented project where I need to download webpages. After sending a custom HTTP request to a web server I start listening for a server response. When reading the response, I check the response headers for a Content-Length:-row. If I get one of those, it's easy to determine when the server is done sending data since I always know how many bytes of data I have received. The problem occurs when the server doesn't include the Content-Length header and also keeps the

How do you remove a leading newline in output to browser in Codeigniter

跟風遠走 提交于 2019-12-22 10:45:15
问题 I have been having issues with a newline appearing in my browser output with Codeigniter. What happens is I am outputting JSON data, but there is a newline character before any of the JSON data, and it is messing stuff up. 回答1: Likely you have some whitespace at the end of one of your PHP files. It is a pretty common problem if you use the closing tag ?> . You'll want to search your code files and look for a ?> with a newline character after it. Anything after a closing tag gets output to the

AWS S3: Force File Download using 'response-content-disposition'

空扰寡人 提交于 2019-12-22 10:43:59
问题 Few lines(below) generate signed URL to which browser is redirected to download a file from S3. I am facing well known issue of Chrome not downloading pdf files from S3 when content type is set as Octet Stream. The solution is to force chrome to download file instead of trying to read/open it. I tried adding 'response-content-disposition' to sign as well as URL, but it didn't work. How to use 'response-content-disposition' header when url is to be generated? String codedFilename= EncodingUtil

Maintaining Browser History when changing page content via Ajax

风流意气都作罢 提交于 2019-12-22 10:38:38
问题 As the title suggests I want to maintain browser history when I am changing the page via Ajax. Now, each page has a corresponding action and/or URL Parameter so it is possible to navigate directly to each page via the URL but because I am changing the page using Ajax the browser's history and URL does change. Think of Google Instant. Your not changing page between searches but the back/forward functionality of the browser is maintained. Any ideas how to do this (jQuery methods especially

Check outgoing browser network calls using Cypress.io

爷,独闯天下 提交于 2019-12-22 10:28:20
问题 On our site, we have Omniture calls that are fired when someone clicks on a link or takes some action. In Chrome DevTools in the network tab, you can see the network request being fired. Is there a way for Cypress.io to capture outgoing network requests, so we can inspect/parse the URLs? The equivalent to this would be something like Browsermob proxy for webdriver set ups. I want to use Cypress.io to tell it to click the link, but then I want to check the outgoing network request by the

Chromium and Firefox display colors differently and I don't know which one is doing it right

拜拜、爱过 提交于 2019-12-22 10:27:54
问题 I've been building a website under Ubuntu 17.10 and use Firefox and Chromium for testing. The two browsers show quite different colors (not only for images but all colors) and I always thought that it is Chromium which for some reason wrongly over-saturates them, so up until now I always chose colors that looked right in Firefox. But I'm starting to get more and more complaints about the website's background being too purple - which it shouldn't be in my opinion as only the blue component of

On mac (Chrome and Safari), words look bolder than on PC, why?

我怕爱的太早我们不能终老 提交于 2019-12-22 10:10:15
问题 When reviewing on different OS's, I noticed that particularly in Chrome and Safari, words on a mac book look bolder than on a PC. Isn't it true that only browser web-kits have the capability of interpreting CSS and HTML, not an OS itself? Here is my CSS for the anchor tags (words) if the above case isn't valid: .homeText .cases { color: #bcbcbc; float:left; font-family:Arial, Helvetica Neue, Sans-Serif; font-size: 2.65em; font-weight:bolder; line-height: 30px; height:30px; margin: 0px; margin

How to get HTML from the browser in SWT after setting the URL

若如初见. 提交于 2019-12-22 10:10:10
问题 I have tried using String html = browser.getText(); But I am getting this error Exception in thread "main" org.eclipse.swt.SWTException: Failed to change Variant type result = -2147352571 at org.eclipse.swt.ole.win32.OLE.error(Unknown Source) at org.eclipse.swt.ole.win32.Variant.getAutomation(Unknown Source) at org.eclipse.swt.browser.IE.getText(Unknown Source) at org.eclipse.swt.browser.Browser.getText(Unknown Source) I have read this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id