![在 IIS 7 中部署 GWT 应用程序](https://linux22.com/image/574051/%E5%9C%A8%20IIS%207%20%E4%B8%AD%E9%83%A8%E7%BD%B2%20GWT%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F.png)
我目前正在尝试通过 Web.config 配置 ASP.net Web 应用程序,以在特定文件夹中托管 GWT WebApp。我已成功在 system.Webserver/staticContent 部分中为 .manifest 文件扩展名配置 mimeMap,但是,我仍无法使用 clientCache。我想添加一条缓存规则,以便使用以下标头为带有“.nocache.”的文件提供服务:
"Expires", "Sat, 21 Jan 2012 12:12:02 GMT" (today -1);
"Pragma", "no-cache"
"Cache-control", "no-cache, no-store, must-revalidate"
有人知道如何在 IIS 7+ 中执行此操作吗?
答案1
最终创建了一个自定义的 httphandler 来处理对路径 .nocache 的所有请求。使用类似于此处描述的解决方案:
https://stackoverflow.com/questions/5063338/prevent-scripts-from-being-cached-programmatically