Should I use Bootstrap from CDN or make a copy on my server?

前端 未结 5 495
终归单人心
终归单人心 2020-11-29 14:32

What\'s the best practice of using Twitter Bootstrap, refer to it from CDN or make a local copy on my server?

Since Bootstrap keeps evolving, I am afraid if I refer

5条回答
  •  臣服心动
    2020-11-29 15:09

    Depends on the specific site.

    Do you have many users? Do you care about bandwidth usage? Is performance an issue (CDN's can speed up the responses) ?

    You can link to a specific version:

    //maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css

    Or

    //maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css

    That way you don't have to worry about library updates, its a better practice to keep updated.

    I am not sure what are the exact statistics about developers choice, but you can have a look here and see Billions of requests are sent to Bootstrap CDN, which means it is robust and safe to use.

提交回复
热议问题