Hacker News new | ask | show | jobs
by anilshanbhag 3336 days ago
I feel this is wrong way to optimize: First, bootstrap gzipped is <100KB after removing font. Check any reasonable site from youtube to amazon, they download ~ 1MB gzipped data on load and do just fine. Second, if you are really concerned, you can just remove a lot of components from bootstrap to reduce its size. I do it for my project where i don't need for example the glyphicon, carousel, etc.

When using a framework, you want it to just work on all platforms. When I look at bootstrap issues, I see so many issues of the form X does not work on Y and then it gets fixed. These little kinks are hard to get right and I am not sure its worth reinventing the wheel unless there is a clear benefit other than size.

3 comments

>Check any reasonable site from youtube to amazon, they download ~ 1MB gzipped data on load and do just fine.

For users with high-speed connections on computers or newer phones. In normal first-world conditions. Your users are not everyone else's users.

Youtube might not be the best benchmark...

1. It actually loads very slow, takes me 5 seconds for the site to become usable on 100Mbit/s and a new fast i7, compared with google.com or hacker news which takes fractions of a second.

2. It is not the first site you go to with a shitty connection as the reason you go there is to watch heavy bandwidth videos.

3. It is essentially a single page app, once loaded, you will stay on the page for the duration of the video and the next video will be played on the same page without reloading.

> Check any reasonable site from youtube to amazon, they download ~ 1MB gzipped data on load and do just fine.

What's important is how much you need to download to be able to do the first meaningful interaction. Downloading 5mb of JavaScript and CSS for your cool dashboard graph might be fine, but you should not need to download that much just to get some reasonable layout or have a look at the possible menu alternatives.