can anyone tell me why the below code for page backward preventing is not working in firefox but works perfectly in google chrome and internet explorer.

can anyone tell the apt code that works in all browsers

<a href="mainpage.html">log out</a>
<script language="JavaScript" type="text/javascript">
window.history.forward(1);
</script>

Moving this to the javascript forum.

You would have better luck on a firefox forum, maybe.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.