3 Replies Latest reply on May 8, 2008 9:56 PM by shoaibghauri

    Sandboxed iframe page re-load

    shoaibghauri
      Hi,
      My Air application uses a sandboxed iframe and its source htm page is loaded from a location other than application directory. I have included a init.js file in the htm page of iframe.

      Now, on basis of some user input I periodically update the init.js (I 'write' the file- it contains object and variable instantiation,etc) file. To visually show changes I have tried to reload the htm page of iframe through several methods however the htm page keeps 'showing' contents according to 'previous' version of init.js file even though init.js has changed.

      The methods that I have used to 'reload'/'refresh' the iframe htm page are:
      > load a 'empty.htm' page in iframe and then cause it to ask parent sandbox bridge to set iframe source back to orignal htm page for iframe.

      > set iframe src to empty i.e. iframeEl.src = '';

      > use reload function .i.e iframeEl.contentWindow.location.reload(true);

      > include the following tags in the htm page to be loaded in the iframe:
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <meta http-Equiv="pragma" Content="no-cache" />
      <meta http-equiv='cache-control' content='no-cache,no-store,must-revalidate,proxy-revalidate' />

      > set iframe src with dynamic query string e.g. iframeEl.src = 'my.htm?' + timeObj.getMilliseconds().toString();

      Can anyone please shed light on how to 'refresh' iframe page so that it starts 'including' updated js file ?
      Thanks a lot for any/all help.