Make Sure Silverlight XAP file is not cached by browser

By Peter Bromberg

A simple "trick" to ensure that your Silverlight XAP file is always loaded "fresh" by the browser.

This is a very simple "trick" but a lot of people aren't familiar with it.

Simply modify the "Source" param in the Silverlight object tag in the page markup as follows:

<param name="source" value="ClientBin/SilverlightNoCache.xap?x=<%=DateTime.Now.Ticks.ToString( ) %>"/>

This will ensure that the url to the XAP is always unique, and therefore will always be loaded "fresh" by the browser.

Make Sure Silverlight XAP file is not cached by browser  (1125 Views)