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.
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: