且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使Bootstrap速度更快,Bootstrap速度非常慢

更新时间:2023-02-06 22:21:47

另一个建议是使用承载文件的内容交付网络或 CDN Bootstrap jQuery 。这样,如果用户已经访问过使用相同CDN加载Bootstrap(或jQuery)的站点,那么这些文件将被缓存在浏览器中。



另一个优点的CDN?他们倾向于优化这些文件的快速交付给用户(例如,基于用户的位置,CDN决定***的服务器/最快的 - 给用户......)

快速Google搜索指向此CDN的Bootstrap: http://www.bootstrapcdn.com/


My site is : Design Spicy

my website is slow during the bootstrap.css and js

Load time : 3.56s (by pingdom) bootstrap.css : 97.9 kB bootstrap.js : 28.7

by Google pagespeed Checker

Compressing http://designspicy.com/…tent/themes/desgnspycy/css/bootstrap.css could save 80.8KiB (82% reduction).
Compressing http://designspicy.com/…content/themes/desgnspycy/js/jquery-1.js could save 59.3KiB (64% reduction).
Compressing http://designspicy.com/…ontent/themes/desgnspycy/js/bootstrap.js could save 20.9KiB (73% reduction).
Compressing http://designspicy.com/ could save 10.8KiB (74% reduction).
Compressing http://designspicy.com/wp-content/themes/desgnspycy/style.css could save 5.9KiB (70% reduction).

i uses bootstrap for mobile optimize css but my site load time is low any suggestion.

Another suggestion is using a content delivery network, or CDN, that hosts your files like Bootstrap and jQuery. That way, if a user has already visited a site where Bootstrap (or jQuery) is loaded using the same CDN, those files will be cached in the browser.

Another advantage of CDN? They tend to be optimized for quick delivery of such files to users (for ex., based on location of user, the CDN decides the best server/ fastest - to the user...)

A quick Google search points to this CDN for Bootstrap: http://www.bootstrapcdn.com/