Skip to main content
Home Forums General Silverlight Hosting and Streaming Imaging Caching on the Server?
3 replies. Latest Post by .netdan on March 24, 2009.
(0)
Joseph B...
Member
2 points
7 Posts
03-24-2009 1:57 PM |
I am having an issue with trying to improve the overall load time of two xap files, in which their sizes are a couple of MB because of images specifically. When the Silverlight applications load, it is cached temporarily on the client. Is there a way to cache the images that my Silverlight xap files are using on the server?
Is there another performance methodology in Silverlight I should be looking at? Isolated Storage?
http://www.myitstudio.com
.netdan
Contributor
3392 points
513 Posts
03-24-2009 2:09 PM |
Do you mean cache the images on the client? If thats the case then do not include the images in the XAP and refer to them directly in silverlight and they will be cached by the browser as normal. Please let me know if I have mis-understood you?
03-24-2009 2:28 PM |
Are you saying you not to store the images in the Silverlight application? I'm really not sure if I'm wrong, but aren't the images in the xap file cached temporarily on the client when the xap file is initially downloaded?
Basically, my Silverlight application will never need to change, so I was wondering if there was a more efficient way of getting the xap file, with images, to the client.
Sorry, I'm actually relatively new to Silverlight, and haven't seen too many resolutions on this matter. I'm going to implement some compression modules, but I know it will only help so much. I wish I could override the ability to have to wait for the entire download and download/begin sections of the applications while the download is still taking place, specifically on images b/c I know it is holding up the app from running initially.
Thanks for the response.
03-24-2009 2:48 PM |
As far as I know the whole XAP file is cached only and any changes to the XAP on the server whether it be to the containing images or not the whole XAP will be downloaded again by the browser. If your Silverlight application will never change then its fine to store the images in the XAP as the XAP will never change it will be downloaded once and cached in the browser. If you want to download the images (or any other content) separate as a background process then you should look at this article about downloading on demand.