locked
iframe in html page generated by VS ? RRS feed

  • Question

  • Hi,

    What is the purpose of the iframe in the test html page generated by VS while creating a new SL project and its associated web site ?

     

    <div id="silverlightControlHost">
    	<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" style="height:100%;width:100%;">
    . . . . </object> <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe> </div>
     
    Thursday, April 2, 2009 2:47 PM

Answers

  • Hi Pluginbaby,

    The iframe element is also for cross-browser compatibility. The presence of the iframe prevents the Safari browser from caching the page. Safari caching prevents the Silverlight plug-in from reloading when the user navigates back to a previously-visited Silverlight page. For more information, see the Safari Developer FAQ.    For more, please take a look at this document.

    Best regards,

    Jonathan

    Thursday, April 9, 2009 6:39 AM

All replies

  • Hmm, I remember seeing this in the past. I haven't used this generated html page in a long while. I only used it in the Beta days. But I'm interested in the reason for this iframe as well.
    Thursday, April 2, 2009 3:09 PM
  • Hi Pluginbaby,

    The iframe element is also for cross-browser compatibility. The presence of the iframe prevents the Safari browser from caching the page. Safari caching prevents the Silverlight plug-in from reloading when the user navigates back to a previously-visited Silverlight page. For more information, see the Safari Developer FAQ.    For more, please take a look at this document.

    Best regards,

    Jonathan

    Thursday, April 9, 2009 6:39 AM
  • Thanks for your information Jonathan. I now at least know why it exists. I've never used Safari so never cared actually, now I know why I should care indeed.
    Thursday, April 9, 2009 6:52 AM