Javascript / Jquery Back Button - So Long As Last Page Was Part Of Current Site?
With the code below I can make a 'back' button, but is there a way of making the link require that the last page was part of the current site?  $(document).ready(function(){     $(
Solution 1:
How about using document.referrer?
$(document).ready(function(){
    $('a.back').click(function(){
        if(document.referrer.indexOf(window.location.hostname) != -1){
            parent.history.back();
            returnfalse;
        }
    });
});
Post a Comment for "Javascript / Jquery Back Button - So Long As Last Page Was Part Of Current Site?"