views:

34

answers:

0

My website uses asual address plugin for implementing hash based URL.
On one of the pages I have placed a back link. I want the following behavior on click of this link.

$('#back_link').click(function(){
 If there is any entry in history it should do history.back()
 If no entry in history, load a default page.
})

Is it possible?

Note: I can do this in Firefox (window.location.hash are different before and after click of the link).
But this is not working in chrome. I also tried using history.length but no success.