This will be extremely tough and complex and kludgy to achieve, if it's possible at all. It would require to predict the target site's behaviour before navigating to the link. On second thought, this may in fact be possible using the onbeforeunload
event but I expect a lot of trouble with pop-up blockers and the like.
I am assuming you have external links, and would like to show some "return to original site" bar in order to not lose visitors.
What I would do as a simple workaround is open the site in a new target="_blank"
window in both cases, and have your "return to site" link close the window using window.close()
.
Pekka
2010-10-17 10:46:15