Files (jQuery, jQuery UI, prototype) from an external server

If I have to load, for example, a jquery.js file from some (albeit about 10) other css / js files, which is better?

"Using the google.load () method gives your application high speed and global access to a growing list of the most popular open source JavaScript libraries."

0
source share
3 answers

Use Google. There is a good chance that it will already be cached on the client computer, as many people use it, so it can be faster.

+2
source

Take a look here: Best Web Performance Practices

Summarized:

Ideally, you should have all the static content on the subdomains, e.g. static1.example.org, static2.example.org. Which increases the paralellity for loading (increased page load / rendering speed). In addition, you should combine css and js files, minimize them and gzip them to reduce the number of hits and the size of the payload. ( mod_pagespeed is an apache module that can do this for you)

Also, your content should be cached with 1 year cache settings and version (by naming convention also available with mod_pagespeed )

+2
source

External servers, so-called CDNs, can be used to speed up a website, for example, they are closer or the file has been used on another website and is already cached.

However, if your site is official, it must be reliable, SaaS or something else using publicly available CDNs is not recommended. The option is to buy a commercial CDN or host inside the company.

+1
source

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


All Articles