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

124
Vistas
Dynamically remove and add injected script in html page

I have project where there are two different js bundles served to the user. If the user is logged in bundle B is served and if the user is not logged in, user is served bundle A. I also have an index.html page where the bundle A is injected like below.

 <script
      type="text/javascript"
      src="dist/A.js"
 ></script>

Bundle A has code that is capable of making api calls to log the user in. Now, when the user logs in and gets response from the server, I want to serve bundle B to the user using the same index.html file. How can this be achieved?

My questions

  • Can this be achieved? How?
  • Even if this can be achieved, will bundle A still have effects after B is applied?
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