Forums / General Questions / How to fix: my website's home page disables the back button on your browser

How to fix: my website's home page disables the back button on your browser

Locked

Started by meg_mcs on 13 Feb 2009, 11:43 PM · Views: 2,417

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
13 Feb 2009, 11:43 PM
#1
meg_mcs avatar

meg_mcs

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

How to fix: my website's home page disables the back button on your browser

An unhappy visitor has just informed me that my home page "mouse traps" people to my site by disabling the "back button". I tested it and yes, when you click back on your browser, it just reloads my home page.

I used to have a separate home page, but last year I converted it to a "define pages" page which is the main shop page of my cart to make it easier for me to change it (Tools -> Define Pages Editor).

My website is mycustomstory.com.

Can anyone tell me how to disable the "disable back button" behavior?

Thanks.

14 Feb 2009, 5:06 AM
#2
lissae avatar

lissae

Totally Zenned

Join Date:
Oct 2007
Location:
Australia
Posts:
814
Plugin Contributions:
0

Re: How to fix: my website's home page disables the back button on your browser

I think it might be because you have a javascript in place on your index page that redirects to the shop directory

<script language="Javascript">
<!--

var URL   = "/shop"
var speed =00000


function reload() {
location = URL
}

setTimeout("reload()", speed);
//-->
</script>
```I am by far no expert LOL but I am thinking given that any visitor is redirected to the shop directory, whenever they click the back button it would just take them 'back' to the main index page which then again redirects to your shop directory.....if that makes sense LOL

There are other methods of redirecting, including [meta refresh](http://webmaster.indiana.edu/tool_guide_info/refresh_metatag.shtml) and .htaccess plus others :)

HunnyBee Design
"A man's manners are a mirror in which he shows his portrait." ~ Johann Wolfgang von Goethe

16 Feb 2009, 7:04 AM
#3
meg_mcs avatar

meg_mcs

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: How to fix: my website's home page disables the back button on your browser

Thanks. I didn't even look at the index, I went straight to the shop index.

Do you know how to fix it?

When I moved to a new hosting company, they suggested I lose my landing page and just have people start on my shop page. It appears instead of removing the landing page and making my home page my shop page, they just did a redirect.

Is there some code I could add to the index page that would do "if user clicks back then override redirect"?

16 Feb 2009, 7:51 AM
#4
meg_mcs avatar

meg_mcs

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: How to fix: my website's home page disables the back button on your browser

I should add that I did change the code to:

<html> <head> <title>My Custom Story Redirect to Shop</title> <META http-equiv="refresh" content="0;URL=http://mycustomstory.com/shop/"> </head> </html>

And tested it with the same results on Firefox. I just also tested on IE and it works properly (allows the user to go to the website they were on before mine).

And ideas on how to make it work for Firefox as well are greatly appreciated.

thanks.

16 Feb 2009, 9:45 PM
#5
meg_mcs avatar

meg_mcs

New Zenner

Join Date:
Jul 2008
Posts:
6
Plugin Contributions:
0

Re: How to fix: my website's home page disables the back button on your browser

It's working now on both browsers. Thanks for your help!