I agree that with browser history it is not that difficult
Am I suggesting something stupid that it seems possible
and then set a variable justenterednewdomain = false
to prevent changing the first variable, which then stores the
address of the previous domain?
Only I didn't succeed in programming this tric.
Do I miss a simple obstacle?
You really can't do anything with the broswer history except call the history.back() function. You can't change or access any of the values in the history. You probably don't want to manipulate the history.back() value anyway because it would interfere with the user's navigation through your own website.
You could check the document.referer property to see if (1) it's a valid URL, and (2) the domain is outside of your own. If the referer is a valid, outside domain, you could save that value in a cookie, and use that URL to create a clickable link for your users.
Soooo, you want to rewrite the browser history script/command/button? Why? Just either open new tabs or use the built in method. If the amount of hop backs is still not enough increase it by browser settings (if possible) or if not install an extension/plugin that does the job.
No, I have no intention to rewrite the history.back() button.
Lots of browsing people while browsing go to a site not by opening a new tab, but by using the same tab again.
Then after a lot of internal tabs it takes time to return to the entering external domain.
In the past Firefox used to have a fastforward and fastbackward button for this purpose.
Experienced browsers like you use browsing history, but for inexperienced users, like most of my readers, a button back to the domain where they came from is quite useful. Instead of x times using the back button.
I never said anything about what they can do. Most users go by using programs without knowing a lot of useful features.
If you use PHP or other programming language that can handle sessions, you can track their EVERY movement and present them with a jump back history, no need of cookies or browser configuration/options.