Basic Requirements
I have a SL app that can be run in-browser or out-of-browser. I want the browser to:
- Cache the xap file
- Load the xap from the cache if it has not changed or re-download it if it has changed.
More details
Setting a future expires
header obviously solves the caching problem but then I cannot force the user to download the latest version. Normally I would just add a querystring to the url (eg url?v=1
) but I cannot do this as this breaks the out-of-browser functionality. eg the app thinks it is not installed when in fact it is.
no cache
If I set Cache-Control
to no-cache
, Chrome and Firefox correctly send a request to the server for the xap but use the cache if a 304 is returned. IE8 just downloads the file again as does Safari.
must-revalidate
Setting Cache-Control
to must-revalidate
again works correctly in Chrome and Firefox but Safari always downloads the xap again while IE8 always uses the cache.
How do I set this up to work as described at the start of this question?