Using libs as jQuery negatively influences the performance / loading time of a page? [duplicate]

1

I say because it uses a lot of methods ... Does this influence page loading?

Well, I heard that the ranking of search engines takes into account the loading time of the site. So a well-done "pure languages" system, without frameworks, would have more performance?

    
asked by anonymous 06.10.2016 / 01:02

1 answer

1

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

  • Interpret the code;
  • Run the code.

As long as the code (without the "async", then synchronous) attribute is in the interpreting and execution state the page would sleep, not counting that the code, after running, still stays inside the buffer buffer until you exit tab / browser window (okay, it 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 load to initiate requisitions, events, etc.

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

jQuery does not really influence loading. If you'd prefer the page to still load while jQuery runs, put the async attribute in the include script, remembering that this may prevent you from using jQuery for the first round in the scopes of the other codes. Anyway, you know that what most affects the loading of the page are synchronous requests, dialogs and confirmations (maybe even iframe direct).

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

    
06.10.2016 / 14:07