Prevent Silverlight xap from being cached by proxy server

前端 未结 2 577
小蘑菇
小蘑菇 2021-01-18 14:17

The company I work for has proxies/WAN accelerators between our international sites to cache Intranet web content. I have a Silverlight application being hosted on a server

2条回答
  •  误落风尘
    2021-01-18 14:55

    What I do is just add a querystring at the end of the path to the xap file. Then when you change the querystring variable, the proxies etc. should see it as a request to a new file. So far this has worked fine for me.

    So basically, when embedding an .xap in a straight-up HTML file, you would do this:

    
    

    And then when you deploy a new version, just change "whatevervalue" to something else.

    EDIT
    If you need to use this technique in many places in your app I would read the querystring value from config and just write it to the page using asp.net. That way you only need to update it in one place when you deploy.

提交回复
热议问题