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

后端 未结 17 687
渐次进展
渐次进展 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:22

    Adding the timestamp for the XAP worked for me (I'm adding the SL control in javascript but this could just as easily be done inline):

    var appTimestamp = '<%= System.IO.File.GetLastWriteTime(Server.MapPath("ClientBin/MyApp.xap")) %>';
    var source = 'ClientBin/MyApp.xap?appTimestamp=' + appTimestamp;
    

提交回复
热议问题