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

162
Vistas
window.parent and window.top are suddenly equal to window.self

I have a web app (B) which is hosted in another application (A) using an Iframe. My web application can without problems post messages (parent.postMessage(“my message", “*”)) to the parent, B.

My app has a link which points to an external web application (C). The link contains a redirectUrl which application C will call (POST) when it is done. The url points to an action in my application. The action ends up by ensuring that the current location is the same as before the user clicked the link:

    …
    var response = Request.CreateResponse(HttpStatusCode.Found);
    response.Headers.Location = new Uri(currentExecutionUrl);
    return response;

Now, once the user returns to my application from application C, it is no longer possible to post messages from my application the parent, A. When debugging the client, I can see the reason for this: window.self, window.parent and window.top are all identical and equal to my application’s window/document.

Notice that this only happens with iPhone / webkit. With android devices and desktop browsers it works as it should, i.e. the parent and top windows properties point to A as expected.

Any help is appreciated!

Thanks

Hank

about 4 years ago · Juan Pablo Isaza
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