[webkit-dev] Need Help about AppCache in Safari 4
陈成
sorrycc at gmail.com
Mon Mar 9 20:13:01 PDT 2009
I've write this to test browser's appcache feature.
*Manifes Code*
CACHE MANIFEST
images/image.jpg
*HTML Code*
<html manifest="demo.manifest">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test</title>
</head>
<body>
<img src="images/image.jpg" />
<script>
var cache = window.applicationCache;
cache.addEventListener('checking', function(){ alert('checking'); },
false);
cache.addEventListener('error', function(){ alert('error'); },
false);
cache.addEventListener('noupdate', function(){ alert('noupdate'); },
false);
cache.addEventListener('downloading', function(){
alert('downloading'); }, false);
cache.addEventListener('progress', function(){ alert('progress'); },
false);
cache.addEventListener('updateready', function(){
alert('updateready'); }, false);
cache.addEventListener('cached', function(){ alert('cached'); },
false);
cache.addEventListener('obsolete', function(){ alert('obsolete'); },
false);
</script>
</body>
</html>
It works in Firefox 3+, but fails in Safari 4.
In Firefox 3+, alert 'checking', 'downloading', 'progress', 'progress' in
order; then in safari 4, it alert 'checking', 'downloading', 'progress',
'error'.
Someone tell me why?
--
Best Regards
ChenCheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090310/5f9358ff/attachment.html>
More information about the webkit-dev
mailing list