Click to See Complete Forum and Search --> : Back button in browser not working
Hi
I have this strange problem. When somebody visits my web site http://www.sinfin.net.mx the back button in the browser just reloads the page and people can't return to the page they came from. I spent many hours looking at the code and searching for the reason on the page itself without any luck. Finally I decided to put another simple page and the problem is the same so it has nothing to do with the index.html page itself. Even if you put a blank page, once you get there, the back button of the browser will not take you back.
Any ideas? anyway I can trace this strange behavior :confused:
felgall
01-12-2006, 02:18 PM
Your home page (not index.html) redirects to index.html using the following code.
<html>
<head>
<title>Relocate</title>
<script language="javascript">
var url = window.location.href;
if (url.charAt(url.length - 1) != "/")
url = url + "/";
var s = url.indexOf("//") + 2;
var e = url.indexOf("@");
if (e > 0) {
var atpart = url.substring(s, e);
var newurl = url.substring(0, s) + url.substring(e + 1 , url.length);
window.location = newurl + "~" + atpart + "/";
} else {
window.location= "/index.html";
}
</script>
<meta http-equiv="refresh" content="4" url="/index.html">
That is the previous page so when you press back you go to that page which redirects back to index.html
JPnyc
01-12-2006, 03:09 PM
It's a common trick. If they hit the black arrow to bring up the history dropdown, they can select the 2nd entry from the top and go back to it.
You got me more confused, what do you mean by home page? where should I look for this code? I belived that index.html was the home page. If not I feel very dumb. :o
I apreciate very much your help
Your home page (not index.html) redirects to index.html using the following code.
<html>
<head>
<title>Relocate</title>
<script language="javascript">
var url = window.location.href;
if (url.charAt(url.length - 1) != "/")
url = url + "/";
var s = url.indexOf("//") + 2;
var e = url.indexOf("@");
if (e > 0) {
var atpart = url.substring(s, e);
var newurl = url.substring(0, s) + url.substring(e + 1 , url.length);
window.location = newurl + "~" + atpart + "/";
} else {
window.location= "/index.html";
}
</script>
<meta http-equiv="refresh" content="4" url="/index.html">
That is the previous page so when you press back you go to that page which redirects back to index.html
thanks but my problem is that we want to use the arrow. Yahoo and Gogle requiere this
It's a common trick. If they hit the black arrow to bring up the history dropdown, they can select the 2nd entry from the top and go back to it.
JPnyc
01-12-2006, 04:53 PM
Well then you need to get rid of that javascript.
I found the file and got rid of it that fixed the problem. Never understood the diference between home page and index.html but I found a page that had the code and deleted it
Thanks for the help