Development Tools Website Optimization Chrome DevTools Basics The Network Panel

James Barrett
James Barrett
13,253 Points

2 second load time on a boostrap.min.css file?

Having looked at the network tab and completed a hard refresh, I noticed that my bootstrap.min.css file took almost 2 seconds to load. Is this bad? Would this be a drawback of using BootStrap?

Moreover, if you saw that it took a long time to request something from the server... What may be going wrong in the code? And what would you do to mitigate this? Also, the same question but for the response time.

Thanks, James.

1 Answer

Abraham Juliot
Abraham Juliot
47,338 Points

Hi James, Sorry for the late response! 2 seconds on hard reload is significant. There are few things to consider: 1. Your internet speed. 2. the origin of the source file.

  1. If internet speed is slow or you're not the only one using your wifi, this could significantly decrease page load speed. 2. Presuming you have a fair internet speed, the server of the source file may be slow at delivering the content to you.

As far as code is concerned, there could be a number issues. They best way to address potential code optimization is to first use a linting tool to check for errors (css lint or js lint), check the console for warnings, and use code optimization best practices--there's a lot of online resource you may google on that note.

And finally, if you are using a commonly used framework or library, it may be beneficial to your visitors to deliver the content through an established content delivery network such as https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css.

Since, a lot of websites use bootstrap, it is possible for your user to have the file cached in their browser before they even visit your site.