ganton1
Technical User
- May 11, 2007
- 2
I've inserted a bit of JavaScript between the HEAD tags in my Web site's HTML so that when a viewer lands on the Home page, (s)he will be redirected to a given "start" page based on the browser's resolution settings, for example, a "start800.html" page or a "start1024.html" page. Now that the site is live on the server, I've discovered that, because a given "start" page is actually the second page in the process, the viewer will get stuck in a loop if trying to use the browser's "Back" button; (s)he will always end up at the redirected (second) page, which makes sense. This has the same effect as disabling the browser's "Back" button. I don't want to do that to my viewers. How can I fix this? One example line of the script looks like this:
<SCRIPT LANGUAGE="javascript">
if (screen.width == 1024)
{parent.location.href='./html/start1024.html'}
</SCRIPT>
<SCRIPT LANGUAGE="javascript">
if (screen.width == 1024)
{parent.location.href='./html/start1024.html'}
</SCRIPT>