Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Https and version control
3 replies. Latest Post by biondi on November 8, 2009.
(0)
biondi
Member
9 points
22 Posts
11-03-2009 7:48 PM |
By using a tool like Silverlight Spy, it can be seen that the entire XAP and its resource files are downloaded and installed physically onto client machine. Is there any way to fine grain control how the version updates of these resource files are being carried out. The objective is to download only the required updates (defined by server side). A simple way is to rename the XAP when there is update required. The same concept as other web page resource files. This is acceptable but I am not sure if the XAP must make a server request by default to check its version every time it starts up. If that's the case, this extra round trip is a problem. Is the same http caching concept applied to XAP? Can I control the timeout using http header? How about if its download using https? Thanks in advance
MarkMonster
Contributor
5220 points
1,046 Posts
11-04-2009 2:23 AM |
Please read this article on caching of the XAP file: http://forums.silverlight.net/forums/t/11995.aspx
11-05-2009 3:50 AM |
Thanks for the link to the previous thread about caching. What I understand from that thread are:
1) IIS configuration to make custom HTTP header for the XAP file i.e. same concept as common web resource files. This is not ideal as there must be a time out value. Setting it short does not help performance. Setting it long will cause delay download when XAP version updated.
2) Passing an InitParam from aspx to the XAP was a test to show the effect of output cache. This sounds an incorrect use of output cache which design to save processing power of rendering aspx pages. XAP file does not have any processing on server side.
3) From the experience shared, XAP does not make any round trip to server checking its version by default.
4) The last resort becomes changing the XAP file name on aspx hosting page. This actually also subject to the aspx cache time out setting. But in case time out, what reload is only the hosting aspx page, supposed to be smaller size that the XAP file.
5) By all means, there is no way to do update precisely for a individual resource file in the XAP package. The entire XAP has to be downloaded.
There may be a lot more we can do. Still searching for any Silverlight performance fine tuning articles.
11-08-2009 3:08 AM |
To reduce the XAP file size by defining external parts using Application Library Caching.
http://msdn.microsoft.com/en-us/library/dd833069(VS.95,lightweight).aspx