PHP - simple way to send HTTP headers before a script ends
PHP typically sends HTTP headers only when a script finishes, causing delays for redirects after long operations. The article notes this issue and mentions that complex workarounds exist for sending headers before script completion.