Navigation
Hello,
I've got an "issue" with the back button of firefox when I have : - a test.html page with a link to "http://localhost:8080/home.html" that redirect to home.html - home.html page posts data in jquery to http://localhost:8080/post.html page
When i use the back button of firefox, i come back to the post.html page. With internet explorer and chrome, i come back to the test.html page
Is this an issue or is this normal. If i want to have the navigation like internet explorer and chrome, what do you recommend ?
Thanks for your help and Best regards
Toutes les réponses (4)
HI, you may have to go to a CSS forum for a work around.
Please check your code. Firefox dislikes errors that others allow. W3C.org (World Wide Web Consortium) in charge of standards and practices and future development of web pages and web browsers make the rules on code. Mozilla Firefox follows these rules. HTML https://validator.w3.org/ CSS https://jigsaw.w3.org/css-validator/ and https://validator.w3.org/i18n-checker/ and http://mobile.css-validator.org/
jdonizeau said
I have :When i use the back button of firefox, i come back to the post.html page. With internet explorer and chrome, i come back to the test.html page
- a test.html page with a link to "http://localhost:8080/home.html" that redirect to home.html
- home.html page posts data in jquery to http://localhost:8080/post.html page
I think you're saying: the browser is displaying post.html. You click the Back button and:
- Firefox comes back to post.html (goes forward from home.html)
- IE and Chrome go back to test.html (goes backward from home.html)
Those are both weird, aren't they, shouldn't all three browsers just display home.html, the page you went back to? What kind of scripting is in home.html that should cause anything else to happen?
jscher2000 said
jdonizeau saidI have :When i use the back button of firefox, i come back to the post.html page. With internet explorer and chrome, i come back to the test.html page
- a test.html page with a link to "http://localhost:8080/home.html" that redirect to home.html
- home.html page posts data in jquery to http://localhost:8080/post.html page
I think you're saying: the browser is displaying post.html. You click the Back button and:
- Firefox comes back to post.html (goes forward from home.html)
- IE and Chrome go back to test.html (goes backward from home.html)
Those are both weird, aren't they, shouldn't all three browsers just display home.html, the page you went back to? What kind of scripting is in home.html that should cause anything else to happen?
Yes, in firefox the back button forwards to home.html that redirect to post.html. Internet explorer and chrome forward to test.html
For you it's normal in firefox and weird in the two others ?
The content of the three files is below Best regards
test.html
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<a href="http://localhost:8080/home.html">ici</a>
</body>
</html>
home.html
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<form id="myForm" method="POST" action="http://localhost:8080/post.html">
<input type="hidden" name="input1" id="input1" value=""/>
<input type="hidden" name="input2" id="input2" value=""/>
</form>
<script>
$( document ).ready(function() {
$("#myForm").submit();
});
</script>
</body>
</html>
post.html
<html>
<head>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
<script>
$( document ).ready(function() {
alert("POSTED DATA");
});
</script>
</body>'
</html>
https://www.jeffersonscher.com/temp/test.html
If you right-click the Back button on the post.html page, you can see that Firefox includes home.html in history and Chrome does not. But I don't know why there is that difference.
If I delay the post until the load event has fired (home2 link), I get the same "back" history in both browsers.
Modifié le