Does using libs as jQuery negatively influence a page’s loading performance/time?

Asked

Viewed 34 times

1

I say because she uses many methods... This influences the loading of the page?

Because I understand that the ranking of search engines takes into account the loading time of the site. So, a system made (well done) in "pure languages", without frameworks, would have more performance?

1 answer

1

What most influences the loading of the page is the synchronous request of the file. These factors may also influence very little:

  • Interpret the code;
  • Run the code.

While the code (without the attribute "async", then synchronous) is in the state of interpretation and execution the page would sleep, not to mention that the code, once executed, still stays inside the buffered memory until you exit the browser tab/window (okay, that depends on the browser).

But in the case of jQuery, when executed it does nothing on the HTML page. It depends on how you use it. The tip is to always wait for the page to load to make the initializations of requests, events, etc.

$(_ => {
    /* statements */
})

The jQuery doesn’t really influence the shipment. If you prefer that the page still loads while jQuery runs, put the "async" attribute in the include script, remembering that this may prevent you from using jQuery first-round in the scopes of the other codes. Anyway, you know that what most affects page loading is synchronous requests, dialogues and confirmations (maybe even direct iframe).

For the last question: "probably yes," if you’re doing things right, avoiding building local objects, avoiding building nested functions, there are a lot of factors that can contribute to performance and can easily be found by research. Remembering: you will have to deal with old browser problems, or alternatively you can create your own API to do wide tasks for each thing.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.