Manish
Manish

Reputation: 6286

Silverlight getting loaded again and again in 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?

Upvotes: 1

Views: 327

Answers (3)

theraneman
theraneman

Reputation: 1630

Could you try using the Silverlight.js 2.0 version from Microsoft. That might solve the caching issue?

Upvotes: 0

o_o
o_o

Reputation: 938

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();

...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.

Upvotes: 1

Michael S. Scherotter
Michael S. Scherotter

Reputation: 10785

Why are you adding this level of complexity? Why aren't you just setting the visibility style of the HTML DIV or OBJECT tag?

Upvotes: 0

Related Questions