Hi . not sure if this is the right place but here goes.
on my web site i can gain direct access to page 'B' or go in via page 'A' now what i would like to achieve is that when hitting the home button on page 'B' if it was opened direct go to page 'A' or if it was opend from page 'A' return to page 'A' when page 'B' is opened from page 'A' it is opened in a new window by the way so the return to page'A' would be a simple window close
There's no way to accomplish that with HTML - it would take scripting and cookies, and probably dependence on the browser's referrer string too, and that is notoriously undependable.
Not sure what you hope to achieve with such complex logic, but my advice would be not to try. The "Home" link on a website is like an essential beacon for navigation the site architecture and your visitors need the experience to be consistent