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

227
Visualizações
Overloading browser's window object - Will it cause performance issues?

I am integrating different third paty tools with my project say newrelic, branchIO etc.., I am loading all of its js in the window object.

Currently i am trying to use one of the internationalization libraries. I have 2 plans. 1)To load the (en/es)translation-keys.json (a file which has key value pairs where values are the texts in corresponding languages) on window object. 2)To load the file in my application's globalState.

Also i have plans to add more 3rd party tools which would be loaded in the window object in future.

My question is, Will overloading browser's window object with many files cause performance issue? If it is so, is there any other way to improve the performance?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

if you are using HTML and js you can use defer and async to control when and how the file.js can load. and for a more advanced option, you can create the import of js file with js

    const script = document.createElement('script');

// 👇️ local file
// script.setAttribute('src', 'another-file.js');

// 👇️ remote file
script.setAttribute(
  'src',
  'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js',
);

script.setAttribute('async', '');

and that with the concept of (async, await, and promise) you can have full control of how & when to load your files.

about 4 years ago · Juan Pablo Isaza 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