On our website, we have some project edit pages. When the user clicks save, the form is posted to the same page, then redirected to the next page. For some reason, the redirects are taking a long time (like 60 seconds).
I’ve placed timing measures in the code, and I can tell you that nothing in the code itself is taking longer than 1 sec to execute.
Here’s what I’m using to redirect:
header("Location: " . $url, true, 307 ); // 307 is temporary redirect
Here is what solved the problem: