My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

How to go back to Window.open() window, not the origin window?

Gene Gi's photo
Gene Gi
·Sep 12, 2019

I have an origin web page A to use Window.open() to create a window of page B, and I have a link to another page C on page B using document.write(), When I click back on page C , I go back to A instead of B, How to set up to make it go back to B?

var newWindow = window.open("", "", "");
newWindow.document.write("<a href='https://www.wikipedia.org'>Wiki</a>")