vephelp
vephelp

Reputation: 542

Google CDN servers hosted libraries VS locally hosted

Is there a difference when we use files that are already stored somewhere(like Google hosted libraries or fonts) than the ones that are stored on local servers for our web pages, like differences on performance perspective?

Upvotes: 1

Views: 536

Answers (2)

Kiran
Kiran

Reputation: 5526

Yes, there are a few differences. In most of the scenarios, your page will load much faster because:

  • If your browser already has a cached version of the library for some other site, it won't load it again.
  • Your browser may connect to Google or other CDN servers simultaneously, which may not happen if you are loading from your server.
  • The latency in getting the file from a Google server is almost always significantly shorter than with your server.
  • You will also have reduced load on your server.

The scenario where you may want to host on your site is if you are serving content for countries where Google, Google's CDN or similar are blocked.

Upvotes: 2

user2443795
user2443795

Reputation: 138

Yes, these is small difference exists. Modern browsers has limit, for example: no more than 4 parallel downloads from one domain. So, if you will use fonts from Google CDN servers, it possible, page will load little bit faster.

Upvotes: 1

Related Questions