Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I would like to have the History.back(); functionality with a complete refresh of previous page.

Any idea how to do that (and make it work in IE, FF and Chrome).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
174 views
Welcome To Ask or Share your Answers For Others

1 Answer

You could redirect (by window.location) to document.referrer

i.e.

window.location.href = document.referrer;

Internet Explorer fix for passing referrer to a particular location:

if(IE){ //IE, bool var, has to be defined
    var newlocation = document.createElement('a');
    newlocation.href = URLtoCall;
    document.body.appendChild(newlocation);
    newlocation.click();
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...