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

182
Vistas
window.location.origin not working on mobile devices?

I have a javascript code where I update a (full-)URL string to get the relative path only:

const url = 'http://www.example.com/map/123'.replace(window.location.origin, "");
console.log(url);

This code, when running on http://www.example.com, would log /map/123.

It works fine on my computer, but I noticed that on my Ipad and on my Android phone, the origin is not stripped.

Is window.location.origin not compatible with all browsers ? And in that case, how should I handle this ?

Thanks

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