A lot of software solutions. However, the solution is to simply configure ClientBin server code on the server (or any other folder in which your XAPs are stored).
Assuming IIS needs to explicitly specify the ClientBin folder, it expires immediately. This will send the correct cache configuration headers when receiving XAP. In turn, the browser will try to remove XAP every time it is needed, but in the vast majority of cases it will simply receive a 304 Unmodified response and can continue to use its cached copy.
I assume that you are seeing the classic IE heuristic problem. In the absence of any caching configuration headers, IE decides on its own whether to even re-request the resource in accordance with its own internal algorithms. By ensuring that the correct expiration headers are sent, IE will follow the server instructions.
Edit
It seems I need to make the work of this approach clearer. This approach does not leave the XAP resource inactive and needs to be retrieved whenever necessary.
By specifying the Expire Immediately function in IIS, we get these headers in response: -
HTTP/1.1 200 OK Cache-Control: no-cache Content-Length: 22359 Content-Type: application/octet-stream Last-Modified: Tue, 21 Jul 2009 11:59:28 GMT ETag: "fe734cb3fa9ca1:1352"
This does not interfere with XAP caching, it simply indicates that the browser cannot use cached XAP without first requesting from the server. Check out the Last-Modified and ETag headers.
The following query looks like this: -
GET /clientBin/SomeApp.xap HTTP/1.1 If-Modified-Since: Tue, 21 Jul 2009 11:59:28 GMT If-None-Match: "fe734cb3fa9ca1:135a" Host: myhost.com
Answer: -
HTTP/1.1 304 Not Modified Cache-Control: no-cache Last-Modified: Tue, 21 Jul 2009 11:59:28 GMT Tag: "fe734cb3fa9ca1:135a"
This answer has no entity body; it gives the browser permission to go ahead and use the existing XAP in the cache.
If the XAP is large, then it is possible that the browser is not actually caching it using Cache-Control, specified as no-cache. Therefore, it may be better to be more explicit.
Instead of using the Expire Immediately field, configure the Cache-Control header using the Custom Header List. Indicate: -
Cache-Control: max-age=0
This will cause the browser to cache large XAP files while expiring them.