Delivering Octicons with SVG
github.com
github.com
There are other techniques for client side-templated sites that will cache SVG icon data. For example, angular material's icon service [2] does this.
[1] https://css-tricks.com/svg-sprites-use-better-icon-fonts/
[2] https://material.angularjs.org/latest/api/service/$mdIconPro...
The repetitions would have to appear within 32KB of each other to be captured in the DEFLATE window [1] which, given that a lot of pages can be 100s of KBs of uncompressed text, may make that impossible.
Additionally, the zlib (or whatever) compression settings would have to be set aggressively enough to identify those duplicates as the best run-lengths to encode. Since GitHub is generating a lot of this live and delivering with low TTFB, they may be using a less aggressive than necessary setting.
[1] https://en.wikipedia.org/wiki/DEFLATE#Duplicate_string_elimi...
I see a bug in repository page: http://i.imgur.com/GdyeFXK.png
> We’re not saying we should, but we could, though SVG animation does have some practical applications—preloader animations, for example.
FYI SVG animation is deprecated in Chrome 45 and later. You'll want to use CSS animation instead.
See https://developer.mozilla.org/en-US/docs/Web/SVG/SVG_animati...
Main thing is now you can't animate SVG in 'before' or 'after' pseudoelements.
But to specifically enter the question: They hide the icons. The aria-hidden attribute makes sure that the icon is not seen by screenreaders [1].
[1] http://www.456bereastreet.com/archive/201205/hiding_visible_...