Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

219
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda