Including this script on a page will immediately redirect visitors to the URL entered.
The difference between location.href and location.replace is that the former will create a new history entry on the visitors computer. This means that if they hit the back button, they can get stuck in a 'redirection loop'. This is usually undesirable and may have unwanted side effects - most pay per click search engines will not allow the submission of URLs that 'break' the back button.
The solution is to use location.replace instead:
Once you know how to redirect visitors, you can send them to different pages based on a variety of criteria. The example script below will redirect visitors with a resolution of 1024x768 or higher to a different page. Of course, there shouldn't be any reason to do so for most websites, which should work at any screen resolution ;)