Other browsers might require 'document.location.href'.
If you want to redirect users from one page to another, a setting in your .htaccess file would be best.
Easiest is:
Redirect 301 /oldpage.html http://www.example.com/newpage.html
Note that the 'oldpage.html' reference uses a file path, but the destination 'newpage.html' requires a complete URL starting with 'http://'.