How to refresh an iframe using JavaScript? If the page is still cached, this shouldn't require a network hit, but does trigger the frame reload. If you wrap your by on load in webpage and once user interacted on screen the iframe will change to src="https://www.youtube.com/embed/uI7fnrNhKSI"its something like innerHTML.replace(new RegExp("loadYoutubeEmbed"),"www.youtube.com/embed")any help available . Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, In 11 lines of code you managed to query for. In iFrame1, make a JavaScript function that is called in the body tag onload. The assign() method loads a new document. Maybe add a dynamic GET parameter f.e. absolute it's work, but stuck with same domain origin policy ==a. I don't even know how to ask the question, really. So, instead of looking at navigator.AppName, why not do something like this, actually testing for the elements you use? Note that if the iframe src has a hash in it (e.g. Connect and share knowledge within a single location that is structured and easy to search. That should reload using the current url. Its inefficient, to be sure, but -- its the only cross-browser (+ versions) solution I've seen so far. To change the iframe src attribute, we will be using a select drop down menu, and a button element to activate the function that will change the src attribute. Logically you'd want to be able to easily and quickly refresh any given frame. Is it possible to control it remotely? Any ideas? This attribute also accepts the values self and src which represent the origin in the iframe's src attribute. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Asking for help, clarification, or responding to other answers. if it doesn't originate from the same location (so far as I understand it). So basically i need a way(function?) It's not them. How do I check whether a checkbox is checked in jQuery? To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Save my name, email, and website in this browser for the next time I comment. The idea is to replace innerHTML value of a div by its current innerHTML value. Why can't the change in a crystal structure be due to the rotation of octahedra? Basil, I know it might be a little late and you have probably figured it out but just in case, you place the code either into your head or you create an external JavaScript file .js ending, just make sure you refer to it in your head. It replaces the url of all iframes to first one to be reloaded. Reload an iframe with HTML (no Java Script req.) Get certifiedby completinga course today! If all of the above doesn't work for you: This for some reason refreshed my iframe instead of the whole script. Changing iframe src with JavaScript not working. I really should have tried this when I first thought about it, my js solution was more convoluted. To learn more, see our tips on writing great answers. Suppose that a user creates a webpage. SOLVED! Just reciprocating Alex's answer but with jQuery: this is useful especially when