views:

26

answers:

1

Hello,

In the past I had problems with the browser cache serving older versions of the xap file. In order to overcome this I dynamically add a query string parameter containg the last modified date of the xap file to the silverlight source parameter in aspx page. This guarentees that clients will receive the latest xap file and not a cached stale versions.

I am now using the DeploymentCatalog functionallity in MEF in a silverlight app to download some xap files. Does anyone know how this works under the hood? Will it use the browser cache or does it download fresh everytime? If it does go through the browser cache, how can I prevent stale cached versions from being served? (as described above).

Thank you!

+1  A: 

The DeploymentCatalog just uses the WebClient class to download the xap. Whether it is cached will depend on your browser. From the server-side you should be able to control whether the browser caches the file by using the HTTP Expires header. Here is a question with some information about this: Browser Caching in ASP.NET application

Daniel Plaisted