0
votes

If my asp.net website has some silverlight content(XAP file, silverlight video content), does user have to download all content everytime he open my website in browser, or date stay saved/cached on Hard Drive even if user turn of computer? In what folder data is saved and how long does it stay saved? I read somewhere about "Reduce XAP size by using application library caching" option when creating silverlight project. Is that option enabled by default(Don't have Silverlight installed in VS)?

1

1 Answers

5
votes

I recommend on reading up on Silverlight and XAP caching here. In short, yes, the Silverlight XAP is cached and only re-loaded when the XAP has been modified or your browser's cache has been cleared.

The browser will cache resources, libraries, xaml, and binaries needed to run the application. This is handled by the browser cache and your files are stored in the temporary internet files directory.

Assembly caching allows your assemblies to be cached by the browser separately from your XAP file. The benefit of this is that you can update your XAP and the browser not have to re-download your assemblies, just the updated XAP file. This can make a big difference in downloads speeds when users re-visit your site.

Sometimes, caching a XAP file can work against you as publishing an update doesn't necessarily dirty the cache. IE handles updates better than Chrome and Firefox. The link above shows you how to configure IIS to immediately expire the web content on publish. This CodeProject link also has a good method for updating the ASP.NET page content with a dynamic string to force a cache refresh on publish.