Should I use ob_start() at the beginning of every script that uses header('Location: file.php') and ob_end_flush() at the end of that same script?
ob_start() and ob_end_flush() are meant to capture everything that is suppose to output to screen to a variable for use later and certainly is not required when you do header(Location). Usually people will put exit; after header("Location...)"; to avoid further execution codes if any (say the header is in a conditional clause, i.e. if ... else header("Location...")
u can use ob_start as a very first statement on the first pagot ne of script in execution flow so u will not face the headers already sent errors if you use header function anywhere in page