缓存清单离线应用程序不刷新Chrome中的javascript文件 [英] Cache manifest offline app not refreshing javascript files in Chrome

查看:101
本文介绍了缓存清单离线应用程序不刷新Chrome中的javascript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用缓存清单文件在脱机Web应用程序上工作.我在刷新JavaScript文件时遇到问题.如果我更改了.js文件(在清单文件中列出),然后又更改了清单文件的版本号.并保存,然后更改后的.js文件不会重新加载到客户端上.我该怎么做才能刷新.js文件?

I am working on an offline web app using a cache manifest file. I am having trouble refreshing my javascript files. If I change a .js file (which is listed in the manifest file) and I then change the manifest file version no. and save it, then the changed .js file does not get reloaded on the client. What do I have to do to get .js files to refresh?

谢谢

推荐答案

这是因为Web服务器告诉浏览器缓存了几个小时的静态文件.因此浏览器不知道清单文件已更改.您可以清除所有应用程序数据或在Web服务器上配置清单是不可缓存的...

That's because the webserver tells the browser cache static files for a few hours. So the browser doesn't know the manifest file is changed. You can clear all the application data 'or' config the web server the manifest is not cacheable...

阅读 http://diveintohtml5.info/offline.html 了解更多信息

如果要清除chrome上的应用程序缓存,请使用chrome://appcache-internals/ 并手动搜索C:\ Documents and Settings \ YOURUSERNAME \ Local Settings \ Application Data \ Google \ Chrome \ User Data \ Default \ Cache

If you want to clear your app cache on chrome use chrome://appcache-internals/ and by hand you have to search in C:\Documents and Settings\YOURUSERNAME\Local Settings\Application Data\Google\Chrome\User Data\Default\Cache

这篇关于缓存清单离线应用程序不刷新Chrome中的javascript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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