Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I did this in Yesod (Haskell web framework) for fun. All images/icons as minified svg in templates, then it would inline everything (css, minified js, svg, etc) at the last moment so you would have only a single request for the complete compiled html file.
It makes loading pages by themselves very fast, but you don't have the advantage of shared cached items (icon was loaded on page a, so for page b it can be retrieved from browser cache) -
hawkes15687yIf you are already using SVG anyway, you can embed multiple SVGs into one and reference them by their path.
If you *have* to embed them in JSON, why do you base64-encode them? SVG is already a text format, which can be gzipped by the server.
PNGs and JPEGs are embedded in SVG as base64 already, why would you double-base64-encode them?
That sounds like a >100% increase in file size...
Related Rants
I had this idea
convert my application icons into base64 and save everything in one big js object
one month after this bizarre moment now I'm here trying to develop a even worst approach.
any suggestions?
undefined
js
whatihavedone
wtf