Topic: Frequent window.location JS redirect causes 403 Forbidden (with fix)

One of the hosting servers I use limits the number of successive requests from the same address. If the requests are coming too fast, I see 403 Forbidden.

The cause appears to be the following JavaScript redirect function (present in admin_maintenance.php and many files in the PunBB Migration Tool):

<script type="text/javascript">window.location="foo.php"</script>

If many successive database operations are not database intensive, the page is small and this redirect function is called several times per second, and my host does not like when the browser requests pages that often.

I solved the problem by making sure that redirects happen 1 second after the page has loaded:

<script type="text/javascript">setTimeout(function() {   window.location="foo.php"  ;}, 1000);</script>

Re: Frequent window.location JS redirect causes 403 Forbidden (with fix)

Moved to Troubleshooting, since this is really a problem with PunBB and a host's configuration