得到的Silverlight在Firefox连连装 [英] Silverlight getting loaded again and again in Firefox
问题描述
我使用Silverlight.CreateObject函数来创建一个XAP它是动态的,即它确实它的东西点击一个对象标记。而当u单击回来它就会消失。当u再次点击它,它应该再次显示的XAP无需加载一遍(因为它已经被下载一次)。
所有在IE工作正常。但在Firefox当我再次点击它,它开始重新装入。
在提琴手它显示为IE和Firefox私有缓存。
有人可以帮我吗?
I am using Silverlight.CreateObject function to create a object tag with a xap which is dynamic i.e. it does it on a click on something. And when u click that back again it gets disappeared. When u click it again, it should show the XAP again without loading it again(as it has been downloaded once). All works fine in IE. But in Firefox when I click it again, it starts loading it again. In fiddler it is showing Private Cache for both IE and Firefox. Can someone help me?
推荐答案
在Firefox中,当你隐藏包含SL应用DOM元素,在SL应用程序被重新初始化。我们使用jQuery来移除对象标记,然后隐藏元素:
In firefox, when you hide a DOM element that contains a SL app, the SL application is re-initialized. we used jQuery to remove the object tag, then hide the element:
$(#元素对象),删除()。
$(#元素)隐藏();
$("#element object").remove(); $("#element").hide();
...在你这么做之前显示(),你必须重新创建SL对象标记。用$就加载的内容更换DOM元素上面时也适用。
...before you do show() you have to re-create the SL object tag. above applies also when replacing a DOM element with $.ajax loaded content.
这篇关于得到的Silverlight在Firefox连连装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!