1

I'm getting starting with bootstrap and followed a website that says

There are two ways to start using Bootstrap on your own web site. you can Download Bootstrap from getbootstrap.com or Include Bootstrap from a CDN

also later

you want to download and host Bootstrap yourself

then

If you don't want to download and host Bootstrap yourself, you can include it from a CDN (Content Delivery Network).

what does it mean what is the process

2
  • 1
    It means you won't include it in your html from the Internet link but from link on your server Aug 24, 2016 at 5:36
  • it means you will download and upload boostrap to your own server and have something like /css/bootstrap.css Aug 24, 2016 at 5:38

2 Answers 2

6

Hosting any css/js file yourself means that you put it on your own website/server. It means people will download it from your website every time they open it up. (unless it's cached locally by the browser, but at least the very first time)

CDN is used so that people already have the files in their cache from any other website they visited using the same CDN. (For example, a google font) This drastically reduces loadtimes for first time visitors, but you do risk delays that are out of your control by loading something from an external website (if it's out, yours won't work properly!)

So it's a speed vs risk thing, basically.

2

hosting it yourself means you download the file and put it in the same place as your website on your web-hosting server.

otherwise, you can reference it in your website with a CDN(content deliver network). these networks hold files for you to use. you add a reference to in your website. and you don't have to keep the bootstrap files on your own server.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

^ this is an example of CDN. they'll probably have a server keeping the file bootstrap.min.css, then they get a domain (bootstrapcnd.com), create a sub-domain(maxcdn). and you can request the resource(the bootstrap.min.css file) from it.

Of the 2 options, you can choose which one is the best for YOU.

i'd list out the "goods" and "bads" of both:

  • Availability: Hosting on your own server means, you never have to worry what happens about downtime. as long as you have your own server up(where your website files are placed) your resources will be available too. Whereas, if your vendor resources(jQuery, Bootstrap) come from a CDN, the CDN server being down will affect your visitors too. A GOOD CDN Service however, gives up time up of around 99.9%.
  • Usability: What do you do when you want to update your jQuery or Bootstrap? If you're hosting yourself, you go to the jQuery or Bootstrap website, download the file and put it on your server, then update the reference in your html. With CDN, you just update the version(given that particular CDN has the updated file).
  • Caching: Every unique visitor to your website will download the resources(jQuery, Bootstrap etc) if it's hosted on your server. With CDN, it these files might already be cached on their browser if they visited a website that uses the same CDN as you. resulting in faster loading time for YOUR page.
  • Bandwidth: Let's say you're using a very cheap hosting. and they give you like 100 MB bandwidth every month. but you do get a 30 unique visitors daily. your website page size with jQuery is 100 KB. and your monthly bandwidth usage around, (30*100*30/1000 = ) 90MB. with jQuery(~84KB) on CDN it becomes (16*30*30 /1000 = ) 14.4MB. (Again this is a hypothetical case. i don't think you can find a hosting as bad as 100MB a month, but you get the point).

I'll add up more when i remember them. hope it helps.

2
  • Although a very informative answer, the "goods and bads list" is quite unclear to me. It's not very clear to which you're pointing the bad and to which you're pointing the good. (especially the "availability" part is confusing). I only understand it because I already know what you're trying to say. If I didn't have that knowledge, it'd confuse the hell out of me.
    – NoobishPro
    Aug 26, 2016 at 19:14
  • @Babydead I get what you mean. When i read it after writing it, i realized It could be made a lot better. I'll update it tomorrow or monday, as i have a little shortage of time as of now. Aug 26, 2016 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.