Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to open a PDF link by clicking on it, Safari saves it as filename.pdf.jpeg, then tries to open it in Preview, and claims that the file is broken.

I checked the requests to see what's wrong, and apparently the system serving the images sends a faulty mimeType and size:

"content": {
    "size": 0,
    "mimeType": "image/jpeg"

Chrome just ignores this and figures out what kind of file it is, but Safari seems to trust the server, and saves a 0 size JPEG.

I can't use the right click -> Download linked file, that just does the same thing. And using Download linked file as only tries to save the .ashx file the server gets the request through.

I've sent an email to the company responsible for the system, but I'm hoping there's a way around this anyway. Any ideas?

share|improve this question
No that is how the web is designed use the mime type. The only way is the right click download and then rename the file – Mark Mar 22 '13 at 11:29
Unless you insist in using Preview, install Adobe reader. – user44516 Mar 22 '13 at 11:41
@Mark & Borderline Yes, but since the file is served through a .ashx handler, I can't even get the file from the server. Safari insists on saving a 0kb jpeg. It cannot be opened by anything because it didn't get saved right. And considering Chrome and other browsers do it, it seems quite possible to just check the incoming datastream to figure out what the file actually is. – Joakim Johansson Mar 23 '13 at 8:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.