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

216
Vistas
What is the correct way to automatically include files on all pages of a website?

What is the best and most effecient way to include a JavaScript file or stylesheet on every page of a website? For example, if I had a script that I included for analytics, I would want to have this script in every page of the website. I could just manually go through all my files and add it, but this could try tedious if I had a lot of files, and I might forget to add all the needed scripts when I created a new file.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If you only use HTML and JS you won't get around doing it manually. You could write some .js file which loads the other styles and scripts you're intrested in to 'bundle' the imports into one file. However if you have any kind of backend you should setup some template that has the files included or a function that includes them.

about 4 years ago · Santiago Trujillo 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