Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent an iframe from reloading when moving it in the DOM

I have an iframe loaded with some content. I would like to move it inside the DOM without causing a refresh (I like the content inside it, I want to keep it).

I'm doing some basic node.appendChild(iframe) to do the job.

Is that possible?

Thanks in advance for your help.

like image 611
Savageman Avatar asked Sep 15 '11 16:09

Savageman


1 Answers

If you're trying to move it visually, you can try modifying the CSS to use absolute positioning or some other adjustments.

However, if you're trying to actually pull it out of the DOM and insert it somewhere else, you won't be able to avoid a reload.

like image 99
John Fisher Avatar answered Sep 20 '22 22:09

John Fisher