Why not use a meta refresh ??
Either that - or sleep() in PHP which will increase the timeout, and should enable to the javascript to load...
Bear in mind though - that if you do use the header() command, you can't output anything to the browser... 😉