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

152
Vistas
Using JavaScript in a cross-domain iframe, trying to detect Top URL

What techniques do y'all have for determining what the top-level URL is (not the domain, the full URL) when your code finds itself in a cross-domain iframe and therefore you don't have access to top.location or anything else useful in the top window object.

Occasionally you can find that parent.document.referrer is useful if you're an extra level down, or document.referrer if you're just one level below top. Occasionally ancestorOrigins can prove useful too. None of these is totally reliable though, so trying to get everything you can, in sequence, seems appropriate.

Are there any new API's in the last couple of years I maybe unaware of perhaps. Or a dev API of some kind. Luckily I don't have to care about Internet Explorer anymore. I'm hoping nobody marks this as a duplicate, because I'm hoping in 2022 there are new answers.

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

0

No.

For privacy and security reasons, browsers have become increasingly restricted over what referrer information they they pass across origins. Not, as you desire, laxer.

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