Is it good to use 2 Javascript libraries on one HTML page?

I know PHP and MVC, but when I work on Joomla I don’t want to learn Mootools for AJAX, I rather want to include jQuery, which I know completely. I think IMHO jQuery has the biggest mind in AJAX libraries.

When I work on Magento, instead of using the associated prototpye, I use jQuery. The same thing happens with SocialEngine, where I don't use mootools related ones, but jQuery, which I know better.

Personally, I believe that you can enable 2 Javascript Libraries in one HTML page, because it does not add additional load to the Server. Even in the client’s browser, I find no performance issues. Moreover, since jQuery is downloaded from the Google CDN, there is every chance that this browser already has it.

Do you think it is possible to include 2 Javascript libraries per 1 HTML page?

+3
source share
4 answers

This is technically normal until the libraries conflict with each other (i.e. both are trying to link $as a function) and you have not noticed terrible performance for your end users.

In addition, each javascript library that you include adds additional requests and client-side processing. Despite the fact that you cannot notice the impact on your computer of development (usually it is a powerful beast), end users on their laptops worth $ 200 may not be so successful.

, HTTP-.

+2

, . , . / $.

. : jQuery

0

, . , 2 .

0

, 2 , .

jQuery , .

librairies, , MooTools < 2, < w590 < 2 Prototype < 2.

0

Source: https://habr.com/ru/post/1762169/


All Articles