redirect if frame buster detected
I'm displaying my outbound links with a header from my site, some of my data providers have frame busters in place.
What I'm trying to accomplish is; if no frame busting is in place (content loaded successfully), then show the frame, else if frame busting is in place, just refresh the entire page with what would have been the frame source?
I've seen a few posts about it, and most of the code requires user interaction, such as:
var prevent_bust = 0
window.onbeforeunload = function() { prevent_bust++ }
setInterval(function() {
if (prevent_bust > 0) {
prevent_bust -= 2
window.top.location = '<?php echo $outurl;?>'
}
}, 1)
That works great, but requires either a refresh or a back button, Is it possible to do that in real time without having to click anything?
I'm open to all alternatives, whether it'd be JavaScript, Ajax, or PHP.
链接地址: http://www.djcxy.com/p/59038.html上一篇: 在广告行业中遭到破坏
下一篇: 如果检测到帧检测器,则重定向