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

271
Views
Making window.close work on Firefox with Cross-Origin-Opener-Policy: same-origin

I have a SiteA which opens SiteB in a popup window and SiteB redirects back to SiteA which has window.close. SiteB has Cross-Origin-Opener-Policy: same-origin set. The problem is that window.close doesn't work in Firefox (works in Chrome).

The flow is like this:

SiteA/1.html -> var openedWindow = window.open(SiteA/2.html)

-> SiteA/2.html redirects to SiteB

-> SiteB has Cross-Origin-Opener-Policy: same-origin

-> SiteB redirects to SiteA/3.html (still in popup)

-> SiteA/3.html -> window.close()

This only works in Firefox if Cross-Origin-Opener-Policy in SiteB set to cross-origin or completely removed.

I tried instead of window.close in 3.html, use openedWindow.close in 1.html but that also didn't work.

I tried window.open('','_parent','') trick instead which also didn't work.

Is there a way to accomplish this?

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!