Hacker News new | ask | show | jobs
by zalew 4887 days ago
Is it just me, or is this image solution overkill? I'm curious, how is introducing this complexity to the build process better than just using a sprite? SASS + Compass automatic sprite generation kind of solves the problem for you (not a SASS vs LESS flame, just an example).

I took a peak at your website's source, and it's strange that you micro-optimize the image while at the same time you have 6 separate uncompressed js files and you didn't bother to serve your assets from a separate cookie-less domain. What's the reasoning here?

btw since when is exposing CSS a problem? I don't get what OP means in that point.

2 comments

Way to edit your post when I was midway through responding :-)

We're relatively unconcerned about our website's (home page) source. Our actual application can be seen at https://www.lucidchart.com/demo. There you'll see a single large Javascript file served from Cloudfront, plus a few third-party-hosted files that we couldn't reasonably CDN (like Google Analytics and some other third-party APIs). There are also three CSS files. One is the bulk of the data (194KB over the wire) which is sent over the CDN. Then there is a separate file for jQuery UI (which will soon be removed) and one that is shared CSS with other parts of our app.

> We're relatively unconcerned about our website's (home page) source. Our actual application can be seen at https://www.lucidchart.com/demo. There you'll see a single large Javascript file served from Cloudfront

oh, ok. now it's not so weird :)

We do use sprite sheets for almost all of the icon-sized images (there are hundreds) in the application. And those sprite sheets are big enough to not get inlined in the CSS. The images that do get inlined are generally odd-sized--though I suppose that automatically generated sprite sheets could manage that for us as well.

Exposing CSS is much less of an issue than exposing Javascript; that list was speaking about JS and CSS generally ("why a build process"). The post goes on to describe why CSS specifically is worth paying attention to.