Does HTML 5 allow to invoke save file dialog with file created in JavaScript?
Does HTML 5 al开发者_StackOverflowlow to invoke save file dialog with file created in JavaScript?
Yes, but you don't really need HTML5 for it, what you can use is a Data URI. There are several limitations, like IE8 only allows files up to 32Kb, and you'll need to get the user to click on a link. See my answer to a similar question for an example.
In the future you may be able to use the File Writer API, but I'm not aware of any browser support for that yet.
I've tested data-uri approach. Currently it works only in Firefox.
Seems that for now it is better to stay with flash: https://github.com/dcneiner/Downloadify
精彩评论