如何使用html5在本地保存文件 [英] How to save files locally using html5

查看:171
本文介绍了如何使用html5在本地保存文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在本地下载mp3文件然后使用html5播放器播放它们,文件应该在那里甚至用户退出浏览器甚至在几天后回来。

how can i download mp3 files locally and then play them using a html5 player , the files should be there even user quit the browser or even come back after couple of days.

推荐答案

HTML5将manifest属性引入HTML元素,该属性允许您指定要在本地缓存的文件清单。我看到的所有示例都只缓存HTML,CSS和JS页面,但您可以尝试缓存其他类型的数据。

HTML5 introduced the manifest attribute to the HTML element, which lets you specify a manifest of files to cache locally. All of the examples I saw cache only HTML, CSS, and JS pages, but you could experiment with caching other types of data.

有关详细信息,请参阅:

For more information, see:

http:/ /www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
http://www.w3.org/TR/html5/offline.html

http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/ http://www.w3.org/TR/html5/offline.html

这篇关于如何使用html5在本地保存文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆