4 ms·
> Is this image inlining thing something new? No, it's been around since forever. Just not used terribly often. > Am I reading it correctly that the images ar
by creshal 10y ago
> Is this image inlining thing something new?
No, it's been around since forever. Just not used terribly often.
> Am I reading it correctly that the images are encoded in base64 and delivered as html? Surely this is a bad idea... no?
It depends. Making a new request to fetch the image always has overhead. Whether that overhead is bigger or smaller than the overhead of base64-encoding the image depends on:
• file size (naturally)
• file compressibility: The difference isn't as pronounced after gzipping everything, especially if the source data is somewhat compressible
• protocol: http2 allows a correctly configured server to push attached data with the original request, so no second request is needed. Even without server push, http2's multiplexing will reduce the overhead drastically compared to plain HTTP1.1 or the worst case, HTTPS1.1 to a different domain. The latter requires a full TLS handshake, and that's what, >30kb data exchanged if you have more than one CA certificate in the chain? That's a lot of image data.
- sillysaurus3 10y agoCompletely offtopic, but how do you type •? I like it.
- hkmurakami 10y agoI personally type it with a unicode keyboard input (ex: Japanese in my case) ex: "・"
- maxerickson 10y agoIt's system dependent. On windows you can do alt+numpad 2022 On whatever is handling input for this XFCE system, control+shift+U 2022+Enter types it.
- creshal 10y agoAnd since I'm lazy, I put it on AltGr+, with xmodmap.
- erichocean 10y ago• is Option-8 on a Mac.
- Symbiote 10y ago• Enable the compose key on Linux — I set the "Menu" key to be compose — then the sequence is Compose . = Characters like →, —, €, £, ©, ™, µ, ①, ②, , °, “ and ”, … and ‽ are easily available, as well as most European-ish letter accents: àáâäąȧåảāãæ. (I live in Denmark, but rarely type Danish. The compose key is more than adequate for typing København, Østerbro and the Æ in my street's name.) https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key
- cperciva 10y agoYou forgot the most important factor: Whether you're reusing that image on a different page. Embedding images in the HTML is basically saving an HTTP request at the expense of not being able to cache the image separately from the HTML.
- 33degrees 10y agoYou can, however, embed images in CSS, which gives you both reduced requests and caching.
- rocky1138 10y agoThis seems like it should work, but have you ever tried it? Or, can you point me to some results of a test to show that it indeed caches the image embedded in the CSS?
- paulddraper 10y agoIf it's inline, then it's cached with whatever it's inlined into.
- echeese 10y agoThe problem is that now it's going to be sent with every request. So it'll make the first page faster for the initial request, but slower in the long run.
- 33degrees 10y agoI'm not sure how you figure that? The CSS file containing inline images would get cached, so nothing would be sent after the initial request.
- mikekchar 10y agoUnless you inline the CSS ;-)
- 10y ago