MozillaZine

some images want to download instead of display

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

Post Posted February 4th, 2008, 12:05 pm

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.

jscher2000

User avatar
 
Posts: 10742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted February 4th, 2008, 5:13 pm

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 Posted February 4th, 2008, 5:30 pm

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

jscher2000

User avatar
 
Posts: 10742
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted February 4th, 2008, 6:14 pm

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. ;-)

makaiguy

User avatar
 
Posts: 16783
Joined: November 18th, 2002, 6:44 pm
Location: Somewhere in SE USA

Post Posted February 4th, 2008, 7:56 pm

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, "The Makai Guy"
Win10 (64bit): FF Quantum 70.0.1 (64bit), TB 60.9.0 (32-bit) ║ Android 8.0/7.1.1: FF Mobile 68.2.0, 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 Posted February 4th, 2008, 7:58 pm

Thank you for the more thorough explanation. I learned something new :)

SkyPilot
 
Posts: 2175
Joined: August 9th, 2004, 1:18 am

Post Posted February 4th, 2008, 9:10 pm

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 Posted February 4th, 2008, 9:20 pm

I dont think itll be necessary but thanks.

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 8 guests