Prevent reloading parent iframe

Is it possible to prevent the parent iframe from reloading?

The sandbox attribute without allow-top-navigation prevents redirection, but does not prevent reloading.

PS: I need a sandbox to allow both allow-scripts and allow-same-origin .

+7
javascript html html5 iframe sandbox
source share
1 answer

See the results here, this was the question asked earlier. It is experimenting with stopping page reload with preventDefault ()

 $(window).bind({ beforeunload: function(ev) { ev.preventDefault(); }, unload: function(ev) { ev.preventDefault(); } }); 

Original answer

Prevent page refresh / reload with JavaScript

Note. This can be done using Javascript with even more work.

+1
source share

All Articles