[whatwg] "Content-Disposition" property for <a> tags

Roger Hågensen rescator at emsai.net
Fri Jul 30 19:42:48 PDT 2010

On 2010-07-30 20:54, Eduard Pascual wrote:
> Let me complement the proposal with a use case:
> http://stackoverflow.com/questions/3358209/triggering-a-file-download-without-any-server-request

Now something like that is a bit more tricky, but can't Javascript 
actually trigger a proper Save As?
Something like <a href="#" onclick="*javascript*: 
document.execCommand('Save As','1','saveMe.csv');"><img 

Should in theory work, but I think browser support for that is spotty, 
so the solution to that stackoverflow post either lies in deep 
Javascript vodoo.
Or make a suggestion to the Javascript "folks" would be better? In any 
case a download attribute would only improve such a functionality (if 
javascript support it) even further by displaying the proper UI.

Roger "Rescator" Hågensen.
Freelancer - http://EmSai.net/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100731/a5a5ae62/attachment-0001.htm>

More information about the whatwg mailing list