JavaScript:history.go(-1) not working in Firefox

 

If you want to go to the last page or referer application history.go(-1) works for IE but it does not work in FireFox.

Back

The fix is to use history.back(); return false; as shows below:-

<a href=“javascript:void(0);” onclick=”history.back(); return false;“>Back

Reference: https://developer.mozilla.org/En/DOM/Window.history

Advertisements

One thought on “JavaScript:history.go(-1) not working in Firefox

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s