some images want to download instead of display

User Help for Mozilla Firefox
Post Reply
mzfuser
Folder@Home
Posts: 1886
Joined: August 15th, 2004, 10:21 pm

some images want to download instead of display

Post by mzfuser »

Very rarely Ill click on a link for an image and Firefox will prompt me for an action instead of just showing the image.

Here is one such link:

http://www.downingsit.co.uk/office_logo.png

and heres the prompt:

Image

Once downloaded, the image displays fine.
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Post by jscher2000 »

The server is sending that image as an "attachment" rather than "inline," which causes Firefox to treat it as a download. Perhaps someone misconfigured the server, forgetting to treat .png files as image files.
mzfuser
Folder@Home
Posts: 1886
Joined: August 15th, 2004, 10:21 pm

Post by mzfuser »

Ok thanks. Also how come IE is able to load it normally?
User avatar
jscher2000
Posts: 11742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA
Contact:

Post by jscher2000 »

MZFuser wrote:Ok thanks. Also how come IE is able to load it normally?

Well, it's possible that IE is getting a different page. I didn't check. Anyway, IE is programmed to "sniff" content and make its own decisions about files. This makes web design even more fun. ;-)
User avatar
makaiguy
Posts: 16878
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA
Contact:

Post by makaiguy »

Every link you click sends out an http request. The receiving server acts on this request, finds the requested file, attaches an http response header to it and sends it back to you.

This http response header SHOULD contain instructions as to the nature of the file that basically tells your browser what it should do with it. For instance, a standard web page in html display language that should be displayed on your screen by your browser would be listed as having a "Content-type" of "text/html". A png image should have "Content-type" of "image/png".

The particular link you provide returns an http response header with "Content-type" of "application/octet-stream". This is a generic content type that is supposed to be used for executable files, not for images. As with all executable files, Firefox will only offer to save to disk, unless you have some utility specifically configured to handle such files.

The owner of that website needs to correct the incorrect content type being presented for that file. If he doesn't know how to do that, he should contact his server management for help.

IE, on the other hand, ignores the content type specified in the response header altogether. Instead, it takes its best guess as to how the file should be handled. You could click on a link that appears to be to another web page or to a simple image, but if the file actually sent was an executable program, IE would take its best guess as to the nature of the file and execute a potentially dangerous program without your knowledge.
Doug Wilson
Win10 64bit: FF 115.0.02 64bit, TB 102.12.0 32-bit ║ Android 13/10: FF 115.2.0/115.0.1 ║ No TB for Android available, dammit!
What a fool believes he sees, no wise man has the power to reason away - Doobie Brothers
mzfuser
Folder@Home
Posts: 1886
Joined: August 15th, 2004, 10:21 pm

Post by mzfuser »

Thank you for the more thorough explanation. I learned something new :)
SkyPilot
Posts: 2175
Joined: August 9th, 2004, 1:18 am

Post by SkyPilot »

I guess you could use this extension if that problem pops up in the future, at least until it's fixed.
http://www.spasche.net/mozilla/
mzfuser
Folder@Home
Posts: 1886
Joined: August 15th, 2004, 10:21 pm

Post by mzfuser »

I dont think itll be necessary but thanks.
Post Reply