Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Silverlight download the assemblies every time?

Tags:

silverlight

Does a Silverlight application get downloaded every time you visit the site or will it check version/size information and only download a newer version of files?

like image 865
Phil Wright Avatar asked Feb 15 '09 00:02

Phil Wright


1 Answers

There is nothing specific to Silverlight 2 in this regard, the most concise explanation I've read is from this post on silverlight.net:

"Silverlight falls under the same caching rules as any other web content. If the user clears their cache, your xap will have to be downloaded again. In normal circumstances, the xap is downloaded only when changed or when the cache expires."

You can control when the cache expires by following the steps outlined here:

You can turn the Enable Content Expiration HTTP header option on for your XAP file. Open IIS Manager, goto Default Web Site and find your Web site for the silverlight project. Find the XAP file under ClientBin. Goto the properties page of the XAP file, on HTTP Headers Tab, Turn on "Enable Content Expiration", click the "Expire Immediately" radio button. Save the change.

This way the new XAP (only there is a new XAP) will get downloaded when you refresh your page without having to close the browser.

This related post may also be of interest.

like image 54
Peter McG Avatar answered Oct 02 '22 01:10

Peter McG