Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
How to close an opened browser tab with javascript after some page navigations

I have an application which opens some larger multi-page dialogues in new browser tabs using window.open(). On the first page in the new tab close() works, but after any navigation in the new tab close() doesn't work any more in modern browsers, all workarounds I found have been disabled by now.

Is there any way to keep the reference to the initially opened window and pass it along during navigation so I can close it from within the new tab after the navigations?

Or access the tab which opened the current tab initially which still holds a reference to the opened window and close it from there?

All pages are controlled by me and share the same host / context if this may help, navigation in the new tab must be top level to some extent, so wrapping into an iframe may not be an option.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!