Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

115
Vistas
close different browser tabs from one application

I have 2 applications where App2 is accessible when we click on a link in App1. Each time this link is clicked, a new browser tab is opened containing App2.

Now I have a requirement where upon logout of App1, all the instances (tabs) opened for App2 should be closed.

I tried capturing window objects of App2. And thought of using winObj.close() to close each one of them with a loop. But the problem is that how and where can I capture window Objects ? (I need to get those objects when user clicks on logout).

I tried in cookie and localStorage by using localStorage.setItem('app2Window', JSON.stringify(window)) but JSON.stringify(window) gives me following error:

Uncaught TypeError: Converting circular structure to JSON --> starting at object with constructor 'Window' --- property 'window' closes the circle at JSON.stringify () at :1:41

Any help/pointers towards this problem will be appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Looks like the BroadcastChannel is what you're looking for:

  • https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API
  • https://developer.chrome.com/blog/broadcastchannel/ it's main purpose is for one-to-many communication between scripts on the same origin.
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda