Iframe content does not refresh after iframe html is edited (1 post)

  1. aashishbhargav
    Posted 2 years ago #

    Situation in hand:
    I have an Iframe hosted on my website http://modgadgets.com
    Its called framed.htm and I update it by changing the HTML of this framed.htm file and replace the new file with old framed.htm file on the hosting server.

    The framed.htm shows old content unless I clear cache of browser (tried in safari, IE9, firefox, chrome, windows OS, Mac OS)
    Or I get the new content if
    I open the path where the framed.htm is stored on the server and hit refresh. Then go back to main site and hit refresh.
    In my case the path is

    What should happen:
    Each time the framed.htm is changed and uploaded, the new framed.htm should show on the home page without having to clean the cache or opening the framed.htm path as my readers will not do it on their computers.

    This issue is specific to wordpress. I tested by hosting htm files outside wordpress and new content shows up only by refreshing

    I have this code added to the head of the iframe hoping that this would refresh the content on home page load but its not working.

    <script type="text/javascript"> iframe.onload = function() {this.contentWindow.location.reload(); this.onload = null;};</script>

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by aashishbhargav
  • This topic is not resolved
  • WordPress version: 3.5.1