How do you force Firefox to not cache or re-download a Silverlight XAP file?

后端 未结 17 721
渐次进展
渐次进展 2020-11-29 02:07

When working with Silverlight, I\'ve noticed that Firefox will cache the XAP file, so if I do an update, a user may be stuck using an outdated version. Is there a way to fo

17条回答
  •  感动是毒
    2020-11-29 02:29

    I'm getting this to work by a combination of the suggestions above:

    1. Set meta tag cache-control/pragma http-equiv attributes to 'No-Cache'
    2. Use an ASP.NET page to host the silverlight control (as opposed to an html page)
    3. Set the Source property of the ASP.NET Silverlight control in the code behind, appending a time stamp to the .xap url e.g.

      Silverlight1.Source = "ClientBin/MyApplication.xap?" + DateTime.Now.ToString("dd-MM-yy-HH:mm:ss");

提交回复
热议问题