带有Wildfly的js和CSS文件的浏览器缓存到期 [英] Browser cache expiration for js and css files with wildfly

查看:106
本文介绍了带有Wildfly的js和CSS文件的浏览器缓存到期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在部署到Wildfly 8.2.1的Web应用程序中打包了一个angularjs javascript应用程序. 有时,当我对此Web应用程序部署javascript或CSS修改时,用户必须手动删除其浏览器缓存以使修改出现. 有没有一种方法可以更改此行为,使用户不必每次都删除其浏览器缓存?

I have a angularjs javascript app packaged in a webapp deployed to Wildfly 8.2.1. Sometimes, when I deploy javascript or css modifications to this webapp, users have to manually delete their browser cache for the modifications appear. Is there a way to change this behavior so users don't have to delete their browser cache every time?

推荐答案

我分享了要点文章关于.

它描述了如何在wildfly undertow子系统中配置响应标头,以调整服务器http响应中的过期缓存标头,以用于特定的静态内容,例如.js,.css,...文件.

It describes how to configure response headers in wildfly undertow subsytem to tune expiration cache headers in server http response, for specific static contents such as .js, .css, ... files.

这篇关于带有Wildfly的js和CSS文件的浏览器缓存到期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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