HTML Image Question - html

I'm trying to do some HTML layouts, and pretty much my problem comes in here:
<img src = "https://something.com/image.png">
The image can be displayed in a browser when navigating to the URL, but not in Microsoft Visual Studio (or the browser when loading this HTML page), it displays as a broken image instead. This leads me to believe it cannot be linked to in such a way (as I can view other images this way). I'm wondering if it has anything to do with it requiring a secure http connection and if there's any way around this.
Basically, the picture comes up when the url is navigated to. However, when opening this HTML file that has the image displayed on it, it comes up as a broken image. I'm wondering why this is.
Thanks.

You 'll need to establish a secure connection to do that. When the browser comes across the url you have placed as src of the image it sends out a request to that server, which responds by offering different encryption methods it supports. But since you 'll be browsing the page as http data you won't be able to understand the response (which is supposed to be image data if the other side is http and now happens to be a query for encryption method). In short you are missing an SSL layer to make your communication sensible and therefore you see a broken image.

Try making it a background image in your css.
edit I am getting down voted for this question. I should have prefaced that I am not sure and was taking a wild guess, if anything to offer an idea that was not presented by the asker to help solve the problem :)

Related

How to show a page URL from a different domain and server in a iFrame

I would like to make this question even if I am almost sure to know the answer. Is it possible to do what described in subject?
When I tried that, Chrome didn't display the page html, but only a bank white space with an error. I read what explained here:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options
Is it correct that the page I want to display must have this parameter set server side in its web server? Is there anything I can do client side in my html code?

downloading parts of a html page on an event

I am developing an universal windows app. I need to download a webpage and extract images from it.
I got the html code and extracted the links to images and downloaded them. The thing is, the site has infinite scrolling (like facebook). When I scroll down to the bottom it loads more images. I am not able to incorporate this into my app. I am a beginner and have very little knowledge of web development or windows app development. This is my first app. I am stuck and have no idea how to proceed. I don't want to use webview as it displays ads from the site and other unnecessary contents. I only want the links to those images. Please help me go past this situation. I need a way to download the new html content that the site loads when user gets to the bottom or some other way to get the image links.
Thanks in advance.
You may or may not be a me to implement this specifically because of the reason you stated. You need to determine how the site loads this information. First I would download Fiddler and in turn enable https connect logging so you can see your encrypted traffic going through Fiddler. Btw the Web View has events you can hook to see loading URLs, etc and it can also be hidden.
So again you need to first understand how the site you want to do this on works and emulate that, assuming they don't have an api already to give you this information as mentioned I'm the comments.
When you do that, come back with code examples and you'll get better help.

Pictures sometime don't load on my website

I've made a website which displays images hosted on other sites using the html src="http://......" tag, however sometimes some of the images won't load. This appears somewhat random, and I don't think it is a problem with the links themselves.
I display a lot of images, so I am wondering if this is a common problem when trying to load many thumbnails from another site. Is the best solution to host all the thumbnails on my own server, and if so, is there an efficient way to do this (so I don't have to manually download and link to every image)?
Thanks
Is way better to host it on your own server.
Because if are all from other servers, you must connect to all servers and download it.
It causes worse response and increase the time required to load the page.
To the image and links downloading - I think it is possible, just go on google and try to find some advanced html page downloader. I had one and it worked directly the way you want. - can't remember the name..
(also sorry for my bad English)

Website location masking - how to hide where media is loaded from?

I'm not really sure how to even ask the question, let alone find an answer. Let me explain:
I have one website (http://www.foo.com). I own a domain that I configured as a URL frame so that when I open http://xyz.bar.com I see my Magento website at http://foo.com/xyz.
The thing is I want to completely hide all references to foo.com. This way I hide it in the address bar, but I still get it when hovering over links and while opening media, in the lower left corner. A simple right mouse click would also give it away.
I know I can configure my Magento website to show a specific base URL. I've tried looking for solutions, but I just don't have the vocabulary to find anything that helps. I appreciate any assistance.
Edit: I understand that in order to post a question here one must know what one is talking about, but I'm stuck and I have no one to help me; so please take it easy with the negative reputation.
You can't.
If the browser is expected to ask example.com for the resource, then you have to tell the browser about example.com. Anything you tell the browser you also tell the user.
The only way to make the data appear to come from example.org would be to copy it from example.com to example.org so it really would be coming from example.org.
HTTP redirects could hide the real URL … but only until it was followed, at which browser the browser is informed where the data really lives.
You could grab the images through separate requests and store them in a temporary location. This will have a lot of overhead, so caching would be mandatory.
Another option is to grab all the images you need and store them permanently on your own server through a batch request.
It's not clear what your actual problem is, so we can't help further. (Why do you need to do this?) There might be a better solution to your problem.
There was already a different domain configured in the same server which is "mapped" to another folder. I simply copied the image files from /home/site1/pics to /home/website2/pics. When loading content from website2, I no longer see "loading from site1".

Paypal auto-generated HTML code: why the 1 pixel image?

If you create a button using PayPals selling tools you are then presented with auto-generated HTML after filling in the details of the particular product you want to sell. At the bottom of this generated code is this strange piece of HTML:
<img alt="" border="0"
src="https://www.paypalobjects.com/*****-***-******-*/en_GB/i/scr/pixel.gif"
width="1" height="1">
What is this used for? It seems to serve no purpose, in fact, if i delete it, the script still seems to run fine.
I think Tom Gullen is right and the one-pixel image is there for tracking purposes. While trying to answer the same question I found the following article that is probably worth reading: http://en.wikipedia.org/wiki/Web_bug. Especially this part:
"Originally, a web bug was a small (usually 1×1 pixel) transparent GIF or PNG image (or an image of the same color of the background) that was embedded in an HTML page [...] Whenever the user opens the page with a graphical browser or email reader, the image or other information is downloaded. This download requires the browser to request the image from the server storing it, allowing the server to take notice of the download."
It probably is sending data back to Paypal for tracking purposes. I would leave it in, it's highly unlikely to be malicious and might benefit you in the way of tracking stats etc.
It's also utilising an HTTPS connection so any data being sent to the Paypal server is secure.
I'd guess one of two reasons:
In the olden days (2001) we used to use 1px images to make sure borders between objects appeared properly (e.g., in a table). They might do it in case the HTML is embedded on a very outdated web design.
If it includes any kind of ID, they may be using it to gather statistics on how often your button is rendered (perhaps to gauge your click-through rate).