是否可以使用 Javascript 使 .manifest 缓存失效?
我们当前正在构建的 Web 应用程序使用 .manifest 文件使其可以离线使用。在应用程序的右上角,我们显示用户名。所有其他上下文都是通过 ajax 请求的。
现在的问题是,当用户注销并且其他用户登录时,用户名字段保持不变,因为浏览器已经缓存了该页面。
所以我的问题是:是否可以使用javascript在注销时使清单文件失效?
我知道我们也可以通过 ajax 填充用户名字段。
感谢您的帮助
The Webapplication we're currently building is using a .manifest file to make it available offline. In the top right of the application we display the username. All other context is requested through ajax.
Now the problem is that when the user log's out and a different one logs in the username field stays the same because the browser cached that page already.
So my question is: Is it possible to invalidate the manifest file upon logout with javascript?
I am aware that we could fill the username field through ajax too.
Thanks for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管我不知道以编程方式执行此操作,但 Web 应用程序的一个常见模式是使用应用程序缓存来存储所有用户共用的资源,并使用其他存储机制(localStorage、indexedDB 等)来存储特定的资源。用户数据。
As much as I don't know a programmatically way to do it, a great common pattern for web apps is to use app cache for the resources that are common to all users and use other storage mechanisms (localStorage, indexedDB, etc) for specific user data.