APPcache
<!DOCTYPE html>
<html manifest="example.appcache">
<head>
<title></title>
<script type="text/javascript" src="test.js"></script>
<script type="text/javascript" src="test2.js"></script>
</head>
<body>
<script>
// http://www.html5rocks.com/zh/tutorials/appcache/beginner/ // Check if a new cache is available on page load.
document.addEventListener('load', function (e) { window.applicationCache.addEventListener('updateready', function (e) {
if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
// Browser downloaded a new app cache.
// Swap it in and reload the page to get the new hotness.
window.applicationCache.swapCache();
if (confirm('A new version of this site is available. Load it?')) {
window.location.reload();
}
} else {
// Manifest didn't changed. Nothing new to server.
}
}, false); }, false); </script>
</body>
</html>
example.appcache文件中
CACHE MANIFEST
#2013-12-11
test.js
test2.js
在apache中
AddType text/cache-manifest .appcache
APPcache的更多相关文章
- AppCache 离线存储 应用程序缓存 API 及注意事项
使用ApplicationCache接口实现离线缓存 原文:http://www.mb5u.com/HTML5/html5_96464.html 推荐:html5 application cache遇 ...
- html5 的缓存应用 manifest="filename.appcache"
启动html5的应用缓存 <!DOCTYPE HTML> <html manifest="filename.appcache"> </html> ...
- appcache checking update
<!DOCTYPE html> <html manifest="a.appcache"> <head> <title></ti ...
- HTML5之appcache语法理解/HTML5应用程序缓存/manifest缓存文件官方用法翻译
习惯性的贴几个参考链接: W3School-HTML 5 应用程序缓存 官方 MDN window.applicationCache 接口文档 官方 MDN 用法示例 看所有的教程不如直接看最原始的官 ...
- HTML5 离线缓存Appcache
创建一个和html同名的manifest文件,比如页面为index.html,那么可以建一个index.manifest的文件,然后给index.html的html标签添加如下属性即可: <ht ...
- appcache的一个特殊用法
Application Cache是HTML5里出现的用来实现离线应用的技术方案.在使用了appcache的页面会被缓存,同时浏览器检查manifest文件有没有变化,如果有变化,只有当用户下次进行访 ...
- File file:/data1/hadoop/yarn/local/usercache/hp/appcache/application_* does not exi
AM Container for appattempt_1453292851883_0381_000002 exited with exitCode: -1000For more detailed o ...
- atitit.提升性能AppCache
atitit.提升性能AppCache 1.1. 起源1 2. 离线存储2 3. AppCache2 3.1. Appcache事件点如图2 3.2. Manifest文件4 3.3. 自动化工具4 ...
- 应用程序缓存 AppCache
Application Cache HTML5提供了一系列的特性来支持离线应用: application cache localStrorage web SQL & indexed datab ...
随机推荐
- java字符编码,字符转码
编码:String->byte[]; str.getBytes(charsetName) 解码:byte[]->String; new String(byte[],charsetName) ...
- POJ 3683 Priest John's Busiest Day
2-SAT简单题,判断一下两个开区间是否相交 #include<cstdio> #include<cstring> #include<cmath> #include ...
- zookeeper C API
typedef void (*watcher_fn)(zhandle_t *zh, int type, int state, const char *path,void *watcherCtx); w ...
- MySQL:MySQL的安装
一.Linux:MySQL的源码安装 1.安装前的准备 在安装之前需要安装一下必备的包和工具 gcc/g++:MySQL5.6开始,需要使用g++进行编译. cmake:MySQL5.5开始,使用cm ...
- Android USER 版本与ENG 版本的差异--MTK官方解释
分类: Android(4) Description]Android USER 版本与ENG 版本的差异 [Keyword]USER ENG user eng 用户版本 工程版本 差异 [Solu ...
- prologue epilogue
https://www.hackerschool.com/blog/7-understanding-c-by-learning-assemblyhttps://www.hackerschool.com ...
- 关于JVM内存模型的一些总结
首先上图,了解一下大概结构 1.程序计数器 程序计数器(Program Counter)是一块较小的内存空间,它的作用可以看做是当前线程所执行的字节码的行号指示器.在虚拟机的概念模型里,字节码解释器工 ...
- 建立一个属于自己的AVR的RTOS
建立一个属于自己的AVR的RTOS(序) 建立一个属于自己的AVR的RTOS(第一篇:函数的运行) 建立一个属于自己的AVR的RTOS(第二篇:人工堆栈) 建立一个属于自己的AVR的RTOS(第三篇: ...
- Lua学习系列(四)
lua 资源:http://www.dcc.ufrj.br/~fabiom/lua/ 第一个Lua程序 http://www.dcc.ufrj.br/~fabiom/lua/ 原文:https://w ...
- 外网主机访问虚拟机下的Web服务器_服务器应用_Linux公社-Linux系统门户网站
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...