-1

Currently, I've included my files from Google, Bootstrap CDN and jsDelivr:

<link rel='stylesheet' id='bootstrap-css'  href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='fontawesome-css'  href='https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' type='text/css' media='all' />
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js'></script>
<script type='text/javascript' src='https://cdn.jsdelivr.net/jquery.migrate/1.2.1/jquery-migrate.min.js'></script>

It's always pop up in my mind that Google is the most suitable source for jQuery and Bootstrap CDN for bootstrap, but jsDelivr supports all of them, should I just import those files from jsDelivr instead?

<link rel='stylesheet' id='bootstrap-css'  href='https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css' type='text/css' media='all' />
<link rel='stylesheet' id='fontawesome-css'  href='https://cdn.jsdelivr.net/fontawesome/4.4.0/css/font-awesome.min.css' type='text/css' media='all' />
<script type='text/javascript' src='https://cdn.jsdelivr.net/jquery/1.11.3/jquery.min.js'></script>
<script type='text/javascript' src='https://cdn.jsdelivr.net/jquery.migrate/1.2.1/jquery-migrate.min.js'></script>

Is there any significant difference between them?

2 Answers2

0

why should including css/js via cdn be a good solution? just reduce yourself to one css and one js since it's pretty easy in your case. The result will be a faster page-load and no dependency on some internet-resources > The page will be available even when offline

moeses
  • 497
  • 1
  • 6
  • 21
0

One advantage of using multiple CDN:s is bypassing the browser's concurrent connection limit, since it's limited by server.

Some stats: Max parallel http connections in a browser?

On the other hand, using Google CDN, you run the possibility of the files already being cached in the user's browser, since using Google CDN is a fairly common practice.

Community
  • 1
  • 1
Jan
  • 5,688
  • 3
  • 27
  • 44