Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: incrediBILL
Here's a link for Location Header [cs.bu.edu].
Note: I've read that, at least through version 4, Opera doesn't support relative URLs as arguments for the replace() method. So if you do go this route, it's best to use absolute URLs.
First: I do agree that a server-side redirect is preferable.
Here's how I currently see the issue -- the viewer expects the BACK button to go the last page they SAW, and if they didn't see the last page in the history list, this becomes problematic. They click on the BACK button, go back to the page with the redirect code and get redirected again, right back to where they started.
The replace() method makes the button work exactly the way the visitor expects it to, and avoids putting them into a loop.
Because replace() does change the history list, stuart probably should not use it on the second move he described -- i.e. to go automatically from the Flash page back to the index page. The visitor has actually viewed the Flash and would expect the Back Button to return there, so the second redirect would use location.href= as you suggest.
But the initial redirect TO the Flash page seems like exactly the kind of situation that the replace() method was developed for.