Be really careful with that though. You may be better to use meta refresh in the browser with your download file as the new url.
You can also use javascript to redirect to a new url after a timer delay.
Some browsers I gather won't show the page until it's all been loaded so your sleep will just look like a poorly performing site.
The you are being redirected in 5 seconds is best done with the meta refresh unless you are actually stalling the user while you do some complicated processing. In that case load up the page and then call the page which does the processing (passing any user variables it needs). By the time it's done the user will think the redirect has happened.