I am trying to use the i frame buster buster code but i need to use a 204 url. How do i create page that gives of a 204 no content error so that this iframe bustter buster code works
<script type="text/javascript">?
var prevent_bust = 0;?
window.onbeforeunload = function() { prevent_bust++; }?
setInterval(function() {?
if (prevent_bust > 0) { ?
prevent_bust -= 2;?
window.top.location = 'http://domain.com';?
} ?
}, 1);?
</script>
in the window.top.location =
i am suppose to a 204 url so how do i create one
Use this service http://httpstat.us/. Just add the status code you want at the end. i.e. http://httpstat.us/204
Http Response Status codes are returned by the server of the page you are sending a HTTP request to. This information is transferred via HTTP (Hyper Text Transfer Protocol) and is NOT something you can control from the client side javascript.
So for you, you would need to create a page on your site that returns this status code in it's http headers and redirect to it from your javascript.
Since you don't specify what server technology you are using, here are some links on how to set the response codes in a few different languages:
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