What happens when I right click on a word doc or some other file on a web page and select ‘save as’? How does the file get from the web page to my computer. Does it use ftp or is it some how coming through http?
Also, the company I work for has an ActiveX control that ftps data back and forth from our clients to our server. I’m having problems getting the ftp to work on clients that have firewalls installed. The ftp part of the code returns a windows error 12007 which I believe means that it can’t connect to the ftp server. I’ve been doing some reading on Passive FTP and I’m wondering if this might solve my problem. Anyone out there have any ideas on this problem?
I don’t know what that error code is, but you could be on the right track with passive mode. It has been awhile since I have thought about this stuff, but I’m pretty sure this is the way it works. “Regular” ftp transfers are initiated on the host machine; your client issues a command to the host machine and the command is carried out by the host machine. A firewall will prevent the data from going through to you because well, that is what it is there for. Passive mode allows the connection to be initiated from inside the firewall on the client machine and most firewalls will allow this through. Although the firewall could be set up to block all ftp traffic, in which case you are likely SOL.
As far as file transfers with a web browser go, I believe that they use http usually, although they generally do support ftp. I don’t think you can set browsers to use passive mode, but I may be incorrect. Maybe they always use passive mode. I don’t know.
It depends. If the link you click on is an HTTP link, the file is coming over HTTP. HTTP has provisions in it for dealing with binary files of any type via MIME encoding. See RFC 2616 for information on HTTP and RFCs 2045, 2046, 2047, 2048, and 2049 for information on MIME.
If the URL says “http://” then it’s HTTP. If it says “ftp://” then it’s FTP. They use different protocols, and use different TCP ports to do the job. You ask how the data gets there if it’s HTTP - the HTTP message headers specify a “Content-Type” and a “Content-Length”, and attach the data after the headers. When it comes through a web browser behind a firewall, the web browser is set up to do its job through a proxy machine, which has access to the outside world. So there’s some additional communication going on - the browser asks the proxy for the web site data, the proxy requests it from that web site, and sends the result back to the requesting machine. Web browsers, when proxies are enabled, communicate with the proxy instead of the ultimate web site.
Your ActiveX control apparently is not set up to do its job through a proxy. Your proxy probably allows FTP, but your control has to know how to make requests for the FTP data from the proxy.
The picture you see has already been sent to your computer, its contents being saved temporarily in special directories set aside for the various pieces of web pages. (I believe it uses FTP to send the file. The browser just manages where it’s saved temporarily on your system.)
When you load the page, you might notice that bigger pictures first are represented by an empty rectangle with a graphic logo, then may expand to the picture’s eventual size, then finally fill with the picture. During this time is when the picture is actually being sent from the web page server to your computer.
When you right click on the picture, two of the options are to ‘save picture as’ or ‘set as wallpaper’. The former lets you save a copy of the picture in whatever drive/directory you want. (It’s still in the temp directory too.) For the latter, it copies it to a file called Internet Explorer Wallpaper.bmp in the c:\windows directory and sets your Windows background to point at that file.
Sometimes the little graphic logo has a red X in it. This means that for some reason the web server couldn’t send the graphic image (timed-out, wrong file name used by web designer, etc). If you right click on the logo, instead of the options listed above, you’ll have the option ‘show picture’. Selecting this will have your computer re-request the data for that picture. If there was just a time-out from the initial load, the picture may yet appear. But if there’s an unrecoverable error with the picture, the red X will reappear.
You’ll also notice that if you use the back button to return to a page, the graphics (most of the time) will load instantly. This is because the graphics are already on your computer, and the browser recognizes this to save time. If, however, it’s been a while before you backed-up to that page, the page itself may have expired, and a reload of the page - text, graphics, and all - is started.
AWB, I think you were answering a different question from what he asked. He was asking about a link to a word doc, not a picture. When there’s a link to another document and you do a save-as, it doesn’t try to load it until you click it.
And you had a bunch of Internet Explorer-specific information in your answer anyway - surely no one who posts to SDMB uses IE ?!?