- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Mon, 21 Mar 2011 08:49:05 -0400
On 3/21/11 8:05 AM, Philip J?genstedt wrote: > On http://foolip.org/microdatajs/live/#json I have a "Download it!" > function which uses data: URLs to save JSON generated by JavaScript. The > only real limitation with this approach is that one cannot suggest a > file name, so in Opera the suggested file name is "default". > > Are there other ways to save script-generated data that don't involve > bouncing against a server? If not, any ideas how one might fix this with > data: URLs? The Content-Disposition header solves this problem, but > can't be applied here. Going forward, there have been some proposals for making this work. See thread at http://lists.w3.org/Archives/Public/uri/2010Feb/0058.html For your particular use case, a "disposition" attribute on <a> or something would also work; I'm pretty sure that this has come up before as well. -Boris
Received on Monday, 21 March 2011 05:49:05 UTC