Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
What he is doing? He is not describing anything at all? I didn't get anything :(
What Nick did
First he combined all svg into one single svg container
this saves the opening and closing svg tags (not much but it saves a little bandwidth)
Then he put this big svg element into every html document
this saves a little bit of bandwidth (no extra HTTP request), but it cost much more memory because the svgs are implemented for every site which is not efficient
Finally he removed the svgs out of the svg element which are not used for this site
this is memory efficient
In the html doc he used:
<svg> <use xlink:href="#twitter" /> </svg>
The svg element indicates that this is an svg. The use element looks for a svg that is already used with the specified class in a symbol element inside of a svg element;