<iframe src="url" sandbox="allow-forms allow-scripts"></iframe>
$(function() { if ('app' !== $('body').attr('id')){ window.setTimeout(function(){ window.top.location.href = 'your redirect url'; }, 5000); } });