tags:

views:

21

answers:

2

How can I modify

<a href="someimage">Download this</a>

in order to invoke the download dialog box?

A: 

Instruct the server to send it with a generic binary MIME type - binary/octet-stream is good for this. Standards conforming browsers will then just download it.

Adam Wright
is that something that only can be done by modifying mime types or javascript can also do it?
XGreen
+2  A: 

You could send a

Content-disposition: attachment; filename=someimage.jpg

HTTP header.

Tomalak