Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!