mirror of
https://github.com/lipis/flag-icons.git
synced 2026-04-26 09:25:50 +03:00
[GH-ISSUE #495] Base64 version (feature request) #302
Labels
No labels
3rd-party
3rd-party
bug
code
documentation
enhancement
fixed-in-master
flag-request
help needed
missing-flag
missing-flag
pull-request
wrong-flag
wrong-flag
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flag-icons#302
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lazysergey on GitHub (Oct 4, 2018).
Original GitHub issue: https://github.com/lipis/flag-icons/issues/495
each flag generates separate request to the server
@lazysergey commented on GitHub (Oct 4, 2018):
@lipis can you give a comment on this?
@lipis commented on GitHub (Oct 4, 2018):
can you be more specific on what you need and how can we help?
@Findus23 commented on GitHub (Oct 4, 2018):
@lazysergey
I'd recommend you to setup HTTP 2.0 which makes the overhead of all those requests a bit less dramatic.
And keep in mind that putting all SVGs as base64 would mean that the browser have to wait with the css rendering until 3MB css have been loaded (even more as bas64 is larger than binary).
@lazysergey commented on GitHub (Oct 4, 2018):
sure, I’m using your awesome lib in countries phonecodes dropdown. When I open the dropdown my app triggers 257 get requests for each *.svg flag
So I thought it might be good feature to have css where all SVGs are encoded directly in css via base64 so server will not be hit with hundreds extra get requests for the flags - it will get all of them along with css
@Findus23 commented on GitHub (Oct 4, 2018):
One more thing: If the flags are shown really small (~20px) you could do something similar to what I am doing in Matomo: Convert the SVGs to optimized PNGs (with 3x resolution for high-res displays).
As flags compress incredibly well the files will have about 180 bytes(!) each with 64x48 px and maybe they will load and render faster in the browser.