Hacker News new | comments | show | ask | jobs | submit login

I think I understand what you are saying.

I did not consider the overhead of the browser parsing the CSS file and then figuring out which rules are applied where and depending on what rules are being applied, figuring out what else needs to be downloaded, etc.

But is that overhead really that significant? Or will the responsive images approach merely shave off a few % off the page load time?




While I think that the overhead on it's own might not be that much, even little gains of tens of MS can add up to improve the experience.

And something like srcSet will possibly allow the useragent to become "smarter" in the future. Perhaps halving image size when low on battery, or when on a limited mobile plan.

This isn't you choosing which image to serve who as a developer, it's serving up a bunch of options and letting the useragent choose which it knows is best for the user at that time.


In the case of preloading. The performance you're shaving off is all the time it takes to download all the images on your page. Which can be significant.

If you're on a slow connection, it can make a page load like it was loading from cache. Which can be quite significant compared to the css approach.

The question of whether the time spent implementing the feature is worth the benefits for a particular project / audience will vary on your use case.




Applications are open for YC Winter 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: