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

96
Vistas
How to alter address bar URL while I'm in a different website?

Let's say I'm on a https://www.example.com. Can I alter address bar URL to display https://www.google.com while I'm in https://www.example.com website using JavaScript?

ex:

I'm on https://www.example.com website, But what if I wanna display different URL like http://www.google.com in the address bar? Is it possible?

Just asking based on learning purpose about the information security.

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

0

No, that would be a security risk, if any website could make it appear to the user to actually be on any other website. Phishing would be a whole lot easier if that was permitted.

The best you can do is history.pushState (or .replaceState), which has the reasonable restriction that:

The new URL can be any URL in the same origin as the current URL.

Or, of course, you could actually redirect to the other website by assigning to location.href.

It might be possible to write a browser extension that fiddles with the internals of the browser so that it displays your arbitrary desired text instead of the actual current page, but such a thing would have to be deliberately installed by the user.

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