My site uses the address plugin to implement the hash url.
On one of the pages I posted the link back . I want the following behavior when clicking 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 is different before and after clicking on the link).
But this does not work in chrome. I also tried using history.length but did not succeed.
Varun source
share