HTML5应用程序缓存更新解决方案 [英] HTML5 application cache updating solution

查看:193
本文介绍了HTML5应用程序缓存更新解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于这个问题,我可能会感到有些生气,因为那里已经有很多东西了.

I may get some heat for this question because there are a lot out there already.

但是...每个问题都有不同的答案,而且似乎没有确定的答案.

BUT... Every question has a different answer and no finite answer seems to be solid.

这样的问题...如果我为离线可用应用程序更新了在应用程序缓存清单中引用的文件,我如何在不更改清单的情况下强制更新清单和离线缓存?

SO THE QUESTION... If I update a file which is reference in the application cache manifest for an offline available application, how can i force the update of the manifest and the offline cache without changing the manifest?

我希望这很清楚.为了证明我已经做了一些研究:

I hope this is clear. To show that I have done some research:

如何正确处理使在线/离线Web应用程序的HTML5缓存清单无效?

https://stackoverflow.com/a/8211563/491044

更新缓存,这需要更改为清单...

Updating the cache This requires a change to the manifest though...

谢谢大家.

推荐答案

您不能.您必须更新清单文件.请小心在清单文件上设置立即到期标头,以使浏览器能够识别到该文件有更新.

You can't. You must update the manifest file. Be careful to set an immediate expiry header on your manifest file so that the browser recognizes there's been an update to it.

这篇关于HTML5应用程序缓存更新解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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