开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜