views:

38

answers:

2

I have a really strange issue in my project.

I have a facebook app which loads a silverlight control in an iframe. Right now the app is pointing to my localhost.

Now the strange thing is if I open the app in two different browser with the same address, it load two differen versions of the same silveright control. (One i start by debugging with Visual Studio, the other by opening localhost in the browser)

How can one of the browsers get the older version of the Silverlight Control and the other one the new version?

+2  A: 

If you have not set up an expiry header at the Web server, the cache of the browser can explain this difference. Empty the cache of both browsers and try again.

Timores
+1. The XAP files tend to be cached more aggressively than HTML or images. Even refreshing the page won't always get the latest version. Clearing the cache will work though.
Steve Wortham
Yes it works with emptying the caches. But how do i tell the browser to ALWAYS download the XAP files?
Ben
@Ben. One way is to tack a querystring variable to the end of the XAP src. If you pass the current time into a querystring, then the XAP file will always be fresh. Another way is to modify your server configuration for the XAP file type as Timores eluded to.
Steve Wortham
Here's an example of what I mentioned about the query string... `<param name="source" value="/ClientBin/RegexHero.xap?dt=<%= DateTime.Now.Ticks %>"/> `
Steve Wortham
+2  A: 

You can also tell the browser to get the XAP everytime (not cache it) by setting the expiration in the headers when the file is sent to the client. You can set this up in IIS under Output Caching by adding the extension of the file: XAP and selecting "Prevent all caching" for that file extension.

JohnEgbert