Hacker News new | ask | show | jobs
by lukeman 3774 days ago
Couldn't you use inline scripts and styles with images specified as data uris?
2 comments

Yes, I've used bundlers before which package the scripts and styles into a single HTML file.
Data URLs for large images are horribly space-inefficient.
Data URLs should be ~1.37x the size [0] of the original file (and generally, kept in the same format). Obviously, there are issues of caching, keeping the image loaded in memory, etc, but it shouldn't be all that bad. Esp. when you consider that ads are inefficient for a variety of other reasons.

[0] https://en.wikipedia.org/wiki/Base64#MIME

Right, I miscalculated, Base64 isn't as bad as I thought.
Once you gzip them they aren't bad.
We've been down the rabbit hole for a while now, and we've decided it's not so bad down here. Now we are browsing for curtains and a good rug to make the place feel more like home.