Could anyone help me? Is it possible to code this? Redirect page inside iframe to another one but we must stay in iframe . Without influence to parent site. I tried many scripts but nothing worked. Here is main code which i use. width and height is only for testing. I use HTML5 sandbox to prevent iframe breaks to main site. I need that to hide referer. Now parent site is showed as referer in iframed site, but i want to first site in iframe was used as referer to redirected one. Maybe it is crap, but i need that.
<!DOCTYPE html>
<html>
<body>
<iframe width="1025" height="350" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" src="URL"; </iframe>
</body>
</html>
Redirect the page containing your iframe embed Modern browsers will prevent an iframe from changing the location of its parent page for security reasons. Your iframe embed code and JavaScript code will need to be modified to allow this behavior.
How do I stop redirecting iframe? You can set sandbox=”” , which prevents the iframe from redirecting.
About. Hidden redirect allows you to quickly create subdomains that seamlessly redirect users to another URL - without changing the URL shown in the address bar. This is done using an iFrame redirect (full-screen iFrame).
If you want the script to run from the frame:
document.location.href = "http://...";
If you want the parent page to redirect (change) the frame location:
HTML:
<iframe name="myFrame" ... />
JavaScript:
window.frames["myFrame"].location = "http://..."
$(function() {
if ('app' !== $('body').attr('id')){
window.setTimeout(function(){
window.top.location.href = 'your redirect url';
}, 5000);
}
});
in IFRAME use
sandbox="allow-top-navigation allow-scripts allow-forms"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With