以编程方式使 Silverlight XAP 文件从浏览器缓存中过期 [英] Making the Silverlight XAP file expire from browser cache programmatically

查看:26
本文介绍了以编程方式使 Silverlight XAP 文件从浏览器缓存中过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何防止 Silverlight XAP 文件被 Web 浏览器缓存?

How to do I prevent a Silverlight XAP file being cached by the web browser?

我想这样做的原因是在开发过程中我不想手动清除浏览器缓存,我正在寻找一种程序化的方法服务器端.

The reason I want to do this is during development I don't want to manually clear the browser cache, I'm looking for a programmatic approach server side.

推荐答案

使用 IIS 管理添加自定义标头 Cache-Control,其值为 no-cache.这将导致浏览器在使用之前检查 XAP 的任何缓存版本是否为最新版本.

Using IIS management add a custom header Cache-Control with the value no-cache. That'll cause the browser to check that any cached version of the XAP is the latest before using it.

这篇关于以编程方式使 Silverlight XAP 文件从浏览器缓存中过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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