O
O
Orbitter2019-04-21 15:06:25
JavaScript
Orbitter, 2019-04-21 15:06:25

External JS libraries or local ones, are there any advantages?

I think many people regularly use the jQuery library and the question is, there are 2 options to connect it:
1) Download the file to your server,
2) Connect via a link from Yandex or Google servers.

I see that many people connect using the link, but the problem is that if the site from which the library is dragged is blocked by Roskomnadzor or its analogues, then the connection does not work and everything flies.

In Ukraine, for example, Yandex is blocked, and when connecting through it, jQuery does not work for a proportion of visitors from Ukraine.

In general, the bottom line: there is some point in connecting via a link or uploading it to our server and we don’t know the trouble. How do you think?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2019-04-21
@Orbitter

Refuse large libs - if you have a lot of new visitors
Connect with a fallback - if you have a lot of permanent ones and it's expensive to remove
them If there are a lot of regular users - use only from your own domain with static

A
Alex Glebov, 2019-04-21
@SkiperX

Connect from cdn for speed

if (!window.$) {
//подключаем локально, если cdn не доступен
}

G
Gip, 2019-04-22
@Giperoglif

people post such things even in cdn for the sake of milliseconds, and you are thinking about connecting remotely.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question