离线存储

来源:互联网 发布:sql server创建数据库 编辑:程序博客网 时间:2024/04/19 14:58
相当于将服务器端的资料,同步(下载到本地), 这样当你离线后,会自动的从本地打开资源
离线存储方式:
通过apache的配置来实现: 
  (1)在apache的conf的httpd.conf中添加
      AddType  text/cache-manifest .manifest
  (2)创建manifest文件(比如php.manifest)说明哪些需要缓存
     eg:
         CACHE MANIFEST
         video.html
         Surface.mp4
  (3)关联manifest文件到html文档
       <!DOCTYPE html>
<html manifest='cache.manifest'>//加载需要缓存的文件
<head>
<meta charset='utf-8' />
</head>
<body>
  <video src='Surface.mp4' width='500' height='300' controls='controls' /></video>  
</body>
</html>
原创粉丝点击