0

At some point in my website I needed a Timer so I looked for a free jQuery Countdown Timer and found this one : Example

After integrating the model to my page inside my IDE (VS2010) i payed attention that some CSS and JS files are not stored locally in my project folder, but they are still Linked to an External sources, and that had me thinking : Am i suppose to find a way to download these file locally than use them, or should i use them the way they are ? and should i be concerned if they may change or desperate at some point in the future ? what are the best practices in case ?

Here is an example of the HTML code :

....
....
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
    <script type="text/javascript" src="inc/TimeCircles.js"></script>
....
....
Stephan Weinhold
  • 1,623
  • 1
  • 28
  • 37
KADEM Mohammed
  • 1,650
  • 2
  • 23
  • 45
  • 1
    thats the purpose of a Content Delivery Network (CDN), that not every resource has to come from your own server, read more here: http://www.wpbeginner.com/beginners-guide/why-you-need-a-cdn-for-your-wordpress-blog-infographic/ – Mark May 15 '15 at 13:19

2 Answers2

1

You should never rely on external sources for critical files unless you're using a dependable CDN. In this case you're using the most common CDN sources for Bootstrap and jQuery, so you're all set.

I assume that you've downloaded the timer files and are hosting those locally. Your reference to them confused me, so I've updated this answer.

isherwood
  • 58,414
  • 16
  • 114
  • 157
1

Those are CDNs ( http://it.wikipedia.org/wiki/Content_Delivery_Network ) meaning that they're hosted by someone for all of us to use, so you're pretty much guaranteed it will stay there. The main advantage of using CDNs is that the user will probably have visited another site that uses the same resource and this means that said resource is already cached in the user's computer, leading to a faster loading time for your site.

isherwood
  • 58,414
  • 16
  • 114
  • 157
Jonas Grumann
  • 10,438
  • 2
  • 22
  • 40